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

Function TwitterTracking

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected