I'm trying to track clicks from our site to an external website. On the external website, I'd like to place some code on their checkout thank-you page, that tells our server that a particular click has resulted in a sale.
How does this tracking code work? Does it need to be a pixel? Do we need to drop a cookie before we send the user to the external website?
Thanks.
How Do Tracking Pixels Work? You add the tracking pixel using a code in your site's HTML code or email, which contains an external link to the pixel server. When someone visits your website, the HTML code is processed by their browser, which follows the link and opens the hidden graphic.
There are three ways to track conversions with the Pixel: standard events, which are visitor actions that we have defined and that you report by calling a Pixel function. custom events, which are visitor actions that you have defined and that you report by calling a Pixel function.
A tracking pixel, embedded somewhere in the email, is how most people monitor whether an email gets opened. Once the tiny, hidden single-pixel image is loaded, it reports back to base. Their use across emails is now up to "endemic" levels according to some experts.
Spy pixels or tracker pixels are hyperlinks to remote image files in HTML email messages that have the effect of spying on the person reading the email if the image is downloaded. They are commonly embedded in the HTML of an email as small, imperceptible, transparent graphic files.
After the tracking pixel code snippet is added to the HTML code of a website or email, the pixel will begin to track various information about the visitor viewing the document. This user data is collected when the tracking pixel is loaded via the visitor's browser.
Conversion pixels are intended to track the effectiveness of different marketing campaigns and sales funnels. They’re usually included in an order confirmation email, or on a “thank you” page that appears after a customer makes a purchase. The pixels can help companies assess the route by which the customer came to make the purchase.
Website URL. Knowledge powered by Ryte. A tracking pixel is an HTML code snippet which is loaded when a user visits a website or opens an email. It is useful for tracking user behavior and conversions. With a tracking pixel, advertisers can acquire data for online marketing, web analysis or email marketing.
As the tracking pixel cannot be seen with the naked eye, and the common user does not recognize the meaning of the small graphic even when it is visible, the tracking pixel involves a transfer of information without consent. Based on this, critics argue that with tracking pixels, user privacy is violated through the recording of a motion profile.
Pixel-based conversion tracking is pretty straightforward. You set up a basic web server to accept HTTP GET requests and write logs for those requests. On the merchant's confirmation page you put an image where the src
attribute is a URL on your tracking server. That URL contains any data you need to collect for the sale, which will show up in your server logs.
(No, this doesn't need to be a pixel. It can be any excuse to make a client request something from your server. XHR requests, script tags, etc will work just fine.)
Example: if you need to know the Order ID number and value of a sale, you could have the merchant embed a pixel that looks like this:
<img src="http://tracker.example.com/i.gif?orderID=12345&orderVal=99.95">
. Your server logs will now have a record of sales generated on that site.
Now you need some way to separate sales you generated from the rest of them. There are three ways to go about this:
An affiliate network can be that third party, the merchant can track traffic sources and use that data to decide when to display your tracking pixel, or you can track it yourself. Which way you go depends on the terms of your partnership.
One popular and easy way to track which sales are yours is to set a cookie on the same domain as the tracker. Since many clients will block 3rd-party cookies, you will track best if your tracking server is also a redirection server.
Example: on your site you make outbound clicks go through your tracking server. Whereas you used to have an
<a>
tag that pointed tohttp://destination-site.com/landing-page.html
you now send traffic to:http://tracker.example.com/redirect.php?url=http%3A%2F%2Fdestination-site.com%2Flanding-page.html
. In this example,redirect.php
should set a cookie and a redirect to the destination site.
Your server logs will now have that cookie value on image requests from the merchant's confirmation page, along with any other data you passed in the cookie (or associated with it on your back end). Now, when you look at your tracking server logs you know the image requests with cookies are yours and the others are not.
Things start getting complicated when there are more parties involved, deeper reporting needs, accounting and PII policies to comply with, concerns over fraud, etc but that's the gist of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With