Custom HTML on “All Pages” loads and executes remote JavaScript from Meta
Source references: 4The GTM example creates a Custom HTML tag that dynamically loads a script from connect.facebook.net and assigns an All Pages trigger. That script runs in the site’s page context; its behavior depends on the remote response and on who can publish the GTM container.
Once deployed, third-party code runs and sends PageView on every matching page. A misconfigured or compromised GTM account or remote script could affect all visitor pages and data accessible to the browser.
This is an example GTM configuration, not code the Skill itself executes. If a user copies and publishes it, however, it loads remote JavaScript from Meta on every page and sends a PageView. The remote script runs in the site’s page context, may disclose visit data to Meta, and its future content is controlled remotely. A user can ask the author to document the consent category, transmitted fields, and scope, and restrict firing to necessary pages after marketing consent.
### Facebook Pixel - Base**Tag Type:** Custom HTML```html<script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', 'YOUR_PIXEL_ID'); fbq('track', 'PageView');</script>Show 3 other places
fbq('track', 'PageView');</script>```**Trigger:** All Pages if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', 'YOUR_PIXEL_ID'); fbq('track', 'PageView');</script>**Trigger:** All Pages