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

Function TwitterTracking

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

Source from the content-addressed store, hash-verified

239};
240
241const TwitterTracking = (): ReactElement => {
242 return (
243 <Script
244 id="twitter-pixel"
245 strategy="afterInteractive"
246 data-twitter-id={TWITTER_TRACKING_ID}
247 >
248 {`
249 (function() {
250 const TWITTER_PIXEL_ID = document.currentScript.getAttribute('data-twitter-id');
251
252 function initializeTwitterPixel(e, t, n, s, u, a) {
253 e.twq ||
254 (s = e.twq = function() {
255 s.exe ? s.exe.apply(s, arguments) : s.queue.push(arguments);
256 },
257 s.version = '1.1',
258 s.queue = [],
259 u = t.createElement(n),
260 u.async = !0,
261 u.src = 'https://static.ads-twitter.com/uwt.js',
262 a = t.getElementsByTagName(n)[0],
263 a.parentNode.insertBefore(u, a));
264 }
265
266 initializeTwitterPixel(
267 window,
268 document,
269 'script',
270 );
271
272 window.twq('config', TWITTER_PIXEL_ID);
273})();
274 `}
275 </Script>
276 );
277};
278
279const RedditTracking = (): ReactElement => {
280 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected