Pixel swapping
Pixel swapping (also called pixel piggyback or container tag-switching) is a technique where one tracking pixel is replaced with another after implementation - typically used fraudulently by dishonest affiliates to hijack conversions belonging to another channel.
What is pixel swapping?
Pixel swapping is a cheating technique in affiliate marketing and digital advertising where someone exploits access to an online store's tracking implementation to replace or manipulate tracking pixels. It can happen in several ways, but the basic principle is to take credit for conversions you didn't generate.
How does it work?
The most typical form of pixel swapping in the affiliate context:
- A webshop installs an affiliate's tracking pixel (e.g. via a JavaScript tag)
- The affiliate changes the content of their tag so that it loads other tracking elements - e.g. cookie-stuffing scripts that overwrite other affiliates' cookies
- The result is that the affiliate is credited for sales they did not contribute to
It can also occur in more technical variants where a container tag (e.g. a tag management tag) is used to load unauthorized tracking scripts on your online store.
Consequences
- Misattribution: You pay commission for sales to the wrong partner. The real source of the traffic is not credited.
- Increased costs: You pay twice - to the advertising that actually drove the traffic and to the affiliate that hijacks the conversion.
- Data impact: Your analytics data is contaminated and you make marketing decisions based on incorrect data.
- Security risk: Unauthorized scripts can potentially collect customer data or introduce malware.
How to prevent pixel swapping
- Use Google Tag Manager: Centralize all tracking in GTM where you have full control over which tags are loaded. Avoid giving external parties direct access to insert scripts into your code.
- Audit your tags regularly: Review all tracking scripts in your GTM container or source code on a regular basis. Look for tags you don't recognize.
- Server-side tracking: With server-side GTM, you have full control over what is sent to third parties. No external JavaScript can manipulate the tracking flow.
- Monitor affiliate performance: If an affiliate suddenly shows an abnormally high conversion rate or takes credit for sales from branded searches, you should investigate.
- CSP (Content Security Policy): Implement Content Security Policy headers to limit which domains can load scripts on your online store.
Related terms
- Cookie stuffing: The affiliate places cookies on the user's device without the user having clicked on an affiliate link. If the user subsequently purchases, the affiliate is wrongfully credited.
- Click injection: Primarily on mobile, where a malicious app registers a fake click event just before the user completes a purchase via an app install.
- Ad fraud: The broader category of fraud in digital advertising, of which pixel swapping is a part.
We know online marketing in Shoporama
We've been working with online marketing ourselves for decades. As the only shop system in the country, we have spoken multiple times at conferences such as Marketingcamp, SEOday, Shopcamp, Digital Marketing, E-commerce Manager, Ecommerce Day, Web Analytics Wednesday and many more.