Skip to main content

Add ad tracking and analytics to your campaign

Want to understand how well your campaigns performs? You can add ad tracking and analytics to your campaign using custom HTML.

S
Written by Support Team
Updated yesterday

Article Navigation

Supported tools:

  • Facebook (Meta) Pixel

  • Google Tag Manager (GTM)

  • Google Analytics (GA)


Add custom tracking to your campaign

To insert tracking scripts (like Facebook Pixel or GTM):

  1. Go to the Campaigns menu

  2. Find your campaign and click Edit campaign

  3. In Step 1: Setup, scroll to the bottom and expand Custom HTML

  4. Paste your script into the HTML Head field

  5. Click Next through Steps 2–6 to save your changes

You can add more than one script — just paste each one on a new line. Note: Floodlight tags are not supported.


Example: Facebook (Meta) Pixel

You’ll need the full base pixel code. Replace `INSERTPIXELID` with your real ID.

<!-- Facebook Pixel Code -->
<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', 'INSERTPIXELID');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=INSERTPIXELID&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

Configure Google Tag Manager (GTM)

If you're using GTM, create a new container just for Audience Republic campaigns to avoid conflicts with other scripts (like pop-ups on your main site).

Step 1: Create a custom event trigger

  1. In GTM, go to Triggers > New

  2. Choose Custom Event

  3. Set Event Name to pageview (exact match, case-sensitive)

  4. Fire on: All Custom Events

  5. Under Advanced Settings: choose Once Per Event

  6. Save

Step 2: Set up a tag

  1. Go to Tags > New

  2. Choose your tag type (e.g., Facebook Pixel, GA)

  3. In Triggering, select the trigger created above

  4. Save and Submit your GTM container


Install Google Analytics via GTM

To track traffic and conversions from channels like email, paid ads, or social:

Step 1: Set up GA in GTM

  1. Create a new tag:

    • Type: Google Analytics: Universal Analytics

    • Track Type: Page View

    • Set up a new variable with your GA Tracking ID

  2. Set the trigger:

    • Trigger type: Custom Event

    • Event name: pageview

  3. Save and publish the container

Tip: Use a separate GA property for campaigns to keep data clean


Set up a Goal in Google Analytics (optional)

  1. In GA, go to Admin > Goals > New Goal

  2. Name: Signup

  3. Type: Destination

  4. Use Regular Expression: unlock

  5. Save

This will track signups as a conversion across all your campaign traffic sources.


Need help?

If you need help setting up your tracking, contact us at support@audiencerepublic.com

Did this answer your question?