Tracking pixels are small snippets of JavaScript code provided by advertising platforms that let you measure conversions, build retargeting audiences, and optimize your ad campaigns. HoopAI makes it straightforward to install tracking pixels on funnel steps and websites without a separate tag manager.
How tracking pixels work
When a visitor loads a page with a tracking pixel installed, the pixel fires and sends data back to the advertising platform. This allows the platform to:
- Record the visit and attribute it to a specific ad campaign
- Add the visitor to a custom audience for retargeting
- Record conversion events (such as form submissions and purchases) and report them back to the ad campaign
Where to install tracking pixels
You can install tracking pixels at two levels in HoopAI:
Funnel-level installation (applies to all steps)
- Open your funnel and click the Settings tab.
- Find the Head Tracking Code and Body Tracking Code fields.
- Paste your pixel base code into the appropriate field.
- Click Save.
The pixel code will fire on every step in the funnel.
Page-level installation (applies to one step)
- Open the specific funnel step in the builder.
- Click Page Settings in the top toolbar.
- Select Tracking Code.
- Paste the pixel code or event code into the head or body field.
- Click Save.
Use page-level installation for conversion event scripts that should only fire on specific steps — such as a purchase event on the thank-you page.
The Facebook Pixel lets you track website events, optimize ad delivery, and build custom audiences for retargeting on Facebook and Instagram.
Installing the base code
Paste the following in the funnel-level Head Tracking Code field, replacing YOUR_PIXEL_ID with your actual Pixel ID from Meta Business Manager:
<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>
Firing conversion events
Add the following code to the page-level tracking code of your thank-you or order confirmation step to record a Lead or Purchase event:
<!-- Lead event (for opt-in thank-you pages) -->
<script>fbq('track', 'Lead');</script>
<!-- Purchase event (for order confirmation pages) -->
<script>fbq('track', 'Purchase', {value: 97.00, currency: 'USD'});</script>
Google Tag (Google Analytics 4 and Google Ads)
Google Tag (formerly known as the global site tag, or gtag.js) installs Google Analytics 4 and enables Google Ads conversion tracking from a single script.
Installing the base code
Paste in the funnel-level Head Tracking Code field, replacing G-XXXXXXXXXX with your GA4 Measurement ID or Google Ads tag ID:
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Firing a conversion event
Add to the thank-you or confirmation page to record a conversion:
<script>
gtag('event', 'conversion', {
'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
'value': 97.0,
'currency': 'USD'
});
</script>
TikTok Pixel
Install the TikTok Pixel to measure ad performance and build TikTok custom audiences. Paste the base code into the head tracking code field and use TikTok’s standard event code (ttq.track()) on conversion pages.
Google Tag Manager
If you use Google Tag Manager to manage multiple tracking scripts, install only the GTM container snippet in HoopAI. Then manage all your pixels, events, and triggers from within the GTM interface — no need to add individual pixel code to HoopAI.
<!-- GTM head snippet -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
<!-- GTM body snippet — add to Body Tracking Code field -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
Use the funnel’s Head Tracking Code field for the pixel base code (which should load on every page) and the Body Tracking Code or page-level tracking code for specific conversion events that should fire only on certain steps.
Always verify that pixels are firing correctly before launching a paid campaign. Use the Facebook Pixel Helper browser extension or Google Tag Assistant to confirm that the base code and events are triggering as expected on each funnel step.