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

Function TwitterTracking

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

Source from the content-addressed store, hash-verified

284};
285
286const TwitterTracking = (): ReactElement => {
287 return (
288 <Script
289 id="twitter-pixel"
290 strategy="afterInteractive"
291 data-twitter-id={TWITTER_TRACKING_ID}
292 >
293 {`
294 (function() {
295 const TWITTER_PIXEL_ID = document.currentScript.getAttribute('data-twitter-id');
296
297 function initializeTwitterPixel(e, t, n, s, u, a) {
298 e.twq ||
299 (s = e.twq = function() {
300 s.exe ? s.exe.apply(s, arguments) : s.queue.push(arguments);
301 },
302 s.version = '1.1',
303 s.queue = [],
304 u = t.createElement(n),
305 u.async = !0,
306 u.src = 'https://static.ads-twitter.com/uwt.js',
307 a = t.getElementsByTagName(n)[0],
308 a.parentNode.insertBefore(u, a));
309 }
310
311 initializeTwitterPixel(
312 window,
313 document,
314 'script',
315 );
316
317 window.twq('config', TWITTER_PIXEL_ID);
318})();
319 `}
320 </Script>
321 );
322};
323
324const RedditTracking = (): ReactElement => {
325 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected