Skip to main content

Pixel Retargeting

Pixel retargeting allows you to track and retarget visitors who click on your shortened URLs. You can add retargeting pixels at both individual URL and campaign levels, making it a powerful tool for your marketing strategy.

Adding Pixels to Individual URLs

When creating or editing a URL, you can add custom retargeting pixels in the Middle Page Script section. This script will be executed before redirecting to the destination URL.

// Example Facebook Pixel Code
!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');

Campaign-Level Pixel Integration

For consistent tracking across multiple URLs, you can set up pixel retargeting at the campaign level:

  1. Navigate to the Campaigns section
  2. Create a new campaign or edit an existing one
  3. Find the Campaign Settings section
  4. Add your pixel code in the Middle Page Script field

All URLs created within this campaign will automatically inherit the retargeting pixel code.

Supported Pixel Types

You can integrate various types of tracking pixels:

  • Facebook Pixel
  • Google Analytics
  • LinkedIn Insight Tag
  • Twitter Pixel
  • TikTok Pixel
  • Pinterest Tag
  • Custom HTML/JavaScript tracking codes

Best Practices

  1. Code Validation: Always test your pixel code before implementing it widely
  2. Script Loading: Ensure your tracking script uses async loading to prevent slow redirections
  3. Multiple Pixels: When using multiple pixels, properly organize them to avoid conflicts
  4. GDPR Compliance: Include necessary consent mechanisms if tracking EU users

Example Implementation with GTM

Here's an example of implementing Google Tag Manager:

<!-- Google Tag Manager -->
<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-XXXX');</script>
<!-- End Google Tag Manager -->

Common Issues and Solutions

  1. Pixel Not Firing

    • Check if the script is properly formatted
    • Verify the pixel ID is correct
    • Ensure there are no JavaScript errors blocking execution
  2. Delayed Redirects

    • Use async loading for your scripts
    • Implement a timeout fallback
    • Optimize your pixel code
  3. Multiple Pixel Conflicts

    • Load pixels in a specific order
    • Use proper script isolation
    • Implement error handling

Privacy Considerations

When implementing pixel retargeting, ensure compliance with:

  • GDPR (EU users)
  • CCPA (California users)
  • Other applicable privacy regulations

Consider implementing a consent management system for users from regulated regions.