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:
- Navigate to the Campaigns section
- Create a new campaign or edit an existing one
- Find the Campaign Settings section
- 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
- Code Validation: Always test your pixel code before implementing it widely
- Script Loading: Ensure your tracking script uses async loading to prevent slow redirections
- Multiple Pixels: When using multiple pixels, properly organize them to avoid conflicts
- 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
-
Pixel Not Firing
- Check if the script is properly formatted
- Verify the pixel ID is correct
- Ensure there are no JavaScript errors blocking execution
-
Delayed Redirects
- Use async loading for your scripts
- Implement a timeout fallback
- Optimize your pixel code
-
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.