MCPcopy Create free account
hub / github.com/dailydotdev/apps / RedditTracking

Function RedditTracking

packages/webapp/components/Pixels.tsx:312–349  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

310};
311
312const RedditTracking = (): ReactElement => {
313 return (
314 <Script
315 id="reddit-pixel"
316 strategy="afterInteractive"
317 data-reddit-id={REDDIT_TRACKING_ID}
318 >
319 {`(function() {
320 const REDDIT_PIXEL_ID = document.currentScript.getAttribute('data-reddit-id');
321
322 function initializeRedditPixel(w, d) {
323 if (!w.rdt) {
324 var p = w.rdt = function() {
325 p.sendEvent ? p.sendEvent.apply(p, arguments) : p.callQueue.push(arguments);
326 };
327
328 p.callQueue = [];
329 var t = d.createElement('script');
330 t.src = 'https://www.redditstatic.com/ads/pixel.js',
331 t.async = !0;
332 var s = d.getElementsByTagName('script')[0];
333 s.parentNode.insertBefore(t, s);
334 }
335 }
336
337 initializeRedditPixel(
338 window,
339 document,
340 );
341
342 window.rdt('init', REDDIT_PIXEL_ID);
343
344 window.rdt('track', 'PageVisit');
345})();
346 `}
347 </Script>
348 );
349};
350
351const TiktokTracking = (): ReactElement => {
352 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected