()
| 310 | }; |
| 311 | |
| 312 | const 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 | |
| 351 | const TiktokTracking = (): ReactElement => { |
| 352 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected