Skip to main content
November 9, 2026
  1. How Affiliate Tracking Works
  2. How to Start Tracking: Setup and Attribution
  3. Ways to Integrate Tapfiliate with Your Platform
  4. FAQ

How Affiliate Sales Tracking and Cookies Work

Affiliate tracking isn’t just about counting clicks; it’s about attribution. It’s the technology that ensures the right partner gets credit for the right sale, every single time.
Here’s a visual of how the tracking works from a click to a conversion attribution:
1. Getting the Link
The process starts when someone joins your affiliate program. They log into their dashboard and grab their unique Referral Link (or other assets like banners). This link carries a code that identifies the affiliate (for example, their referral code: yourstore.com?ref=john_doe)—this code is the “fingerprint” that ties any future actions back to that specific affiliate.
2. The Promotion
The affiliate then shares the link. They might include it in a YouTube video description, add it to a blog post, or post it on social media. The link sits there until a potential customer clicks it.
3. The Click: Starting the Journey
When a user clicks the link, they are redirected to your website. A tracking script on your landing page activates. This script records the click and stores a visitor ID in a cookie or local storage in the user’s browser. This step is crucial because the visitor ID lets the system find this click later, and the click tells it which affiliate sent the visitor.
Tip: If you use a cookie consent tool, check with your developer how the script loads with and without consent. Tracking processes personal data: see Tracking and cookies on your website for what this means for your site. 4. The Cookie: Remembering the Affiliate
The cookie acts like the system’s memory. It keeps the visitor ID, not the affiliate’s ID or referral code: the affiliate and the program are stored with the click in Tapfiliate. If the user leaves your site and comes back days later to make a purchase, the cookie ensures the system still knows which affiliate referred them. The affiliate is credited when the purchase comes within your program’s Cookie time after the last click.
5. The Conversion: Completing the Sale
When the user completes a purchase or sign-up, a second script – called the Conversion pixel – fires on the “Thank You” or confirmation page. This script checks the browser for the cookie. If it finds it, the system knows, “This customer came from John Doe.” It then records the sale and the amount. This method is also referred to as the “Conversion Tracking Script” and works by reading the affiliate cookie when users land on the confirmation page after completing a purchase.
6. The Reward: Calculating the Commission
Finally, the system calculates the affiliate’s commission based on the rules you set (for example, 10% of the sale). The commission is added to the affiliate’s balance in their dashboard.
Note: Integration must be completed before tracking can begin. This step is essential to start running an affiliate program.

How to Start Tracking: Setup and Attribution

Tapfiliate is a user-friendly affiliate tracking and management software designed to help you grow your business through partnerships. By integrating Tapfiliate, you will be able to:
  • Track sales from your affiliates: Know exactly which customers came to your website or app through your affiliates. This means you can see which partners are driving traffic and sales, without any guesswork.
  • Attribute conversions accurately: When a visitor makes a purchase, signs up, or downloads your app, Tapfiliate automatically credits the correct affiliate. This ensures everyone gets fair recognition for their efforts.
  • Calculate commissions easily: Tapfiliate takes the hassle out of calculating payments. You can automatically pay your affiliates based on their performance, saving time and avoiding mistakes.
  • Get clear performance reports: See which affiliates are performing best, track trends over time, and make data-driven decisions to grow your affiliate program efficiently.
Tapfiliate turns your affiliate partnerships into a measurable, manageable, and profitable channel. Instead of manually tracking referrals and commissions, you get accurate data and actionable insights — helping you scale your business faster and reward your partners fairly. How Tapfiliate’s tracking code works When a visitor clicks an affiliate link to your website, our tracking script sends the click to Tapfiliate, which records it with the affiliate and the program. In reply the script gets a visitor ID and saves it in a tap_vid cookie in the visitor’s browser. The cookie holds only this visitor ID, not the affiliate’s ID or referral code. When the visitor comes back with this cookie (or its copy in local storage) still in their browser and converts within your program’s Cookie time, Tapfiliate finds the visitor’s most recent click by this ID, and that click names the affiliate. Cookie time is the number of days after the last click during which a conversion is still credited to the affiliate. Tapfiliate applies it inside its system: it is not how long the cookie stays in the user’s browser (see Cookie time). By default, it’s 45 days, and it can be set anywhere from 1 to 365 days. Our tracking is highly reliable because the visitor ID in the cookie leads Tapfiliate to the visitor’s click, and the click names the affiliate, ensuring accurate attribution even if the visitor returns to your site later. You can configure a Program’s cookie time the following way:
  1. Go to Programs → select your program → General settings
  2. Set the preferred Cookie time in days
  3. Click Save

Ways to Integrate Tapfiliate with Your Platform

There are several ways to connect Tapfiliate to your website or app, depending on your needs and technical resources: 1. Ready-made plugins and JS snippets
Tapfiliate offers user-friendly integrations for platforms like Shopify, WordPress, WooCommerce, Wix, and many others. These can often be set up without developer assistance, making it quick and easy to get started.
2. JavaScript snippet
Similar to Google Analytics, Tapfiliate provides a JS snippet that you embed on your site. Developer help may be required to install this correctly.
3. REST API integration
For more advanced or custom setups, Tapfiliate offers a REST API. This method allows for full customization, but developer support is usually needed.
4. Automation tools
You can also integrate Tapfiliate using automation platforms like Zapier or Make, or via Tapfiliate’s external Webhook feature. These options allow you to connect Tapfiliate with other tools and workflows, though developer help might be helpful for more complex automations. For example, you can set up a Zapier workflow to track recurring payments from platforms like PayPal. This ensures that recurring commissions are accurately recorded in Tapfiliate.
5. Tracking via Coupons
It’s possible to track affiliate-driven transactions with coupons provided that the platform you use has the capacity to generate coupon codes.
Coupon tracking can be set up through the REST API, Zapier, or Make. Depending on the tools you use, you may need assistance from a developer to complete the setup. If you’re using Shopify, WooCommerce, or Teachable, coupon tracking is supported automatically once you complete the integration for that platform – no additional setup is required. 6. Server-to-Server (S2S) Postbacks
For scenarios where users do not return to your website after checkout (e.g., payments completed on a third-party platform like Heally), your server can report each sale to Tapfiliate with a postback once it learns about the payment. Postbacks carry your API key, and the key is meant to be used only from your own server (Keep it secret).
The postback also tells Tapfiliate which affiliate referred the customer, for example with the click ID you kept with the order. Track sales from a custom or third-party checkout shows how to keep the click and carry it to the system that learns about the payment: with the JavaScript tracking code on your website, or, where it can’t run, by recording the click from your server. The requests are described in Server-to-server tracking. Developer support is usually needed.

FAQ

❓I don’t see my e-commerce platform listed. Can I still use Tapfiliate?

If your platform is not included in Tapfiliate’s list of supported platforms, you may still integrate Tapfiliate—it just might require some additional technical assistance. Supported platforms typically include step-by-step installation guides and do not require a developer. However, for platforms that are not currently supported, you may need help from a developer to complete the setup. Tapfiliate can be integrated with any custom platform using either our JavaScript Integration Guide or our REST API Integration Guide.

❓How affiliate links are generated?

Tapfiliate automatically generates a unique URL for each affiliate by adding a referral parameter to your domain (for example: https://yourwebsite.com/?ref=ottlmtm).

❓Is cross-domain tracking supported?

Not by the tracking script alone. The script remembers the affiliate’s click with a first-party cookie on the domain where the visitor lands, and a page on another domain can’t read that cookie. So when the visitor lands on one domain and buys on another, the script there can’t count on finding the click.
Your developer can carry the click there instead: keep the click ID, add it to the link or form that takes the visitor to the other domain or checkout, and create the conversion from your server when the payment succeeds. Report each sale in one place: if your server reports a sale, don’t also report it with the tracking script, on that domain or on yours, or the same sale could be counted twice or go to another affiliate. Track sales from a custom or third-party checkout shows how. Subdomains of one domain need at most a setting of the script, see How to Track Across Domains and Manage Multiple Affiliate Programs.

❓What kind of technical support can I get?

Our technical support can help with:
  • Reviewing your use case and suggesting how the flow can be implemented
  • Pointing you to relevant code snippets in our technical library
  • Outlining the type of code your developers would need to create for the setup
What we don’t provide is the creation of custom code for individual clients. Essentially, we guide and support your team, while your developers implement the code on your site.

❓How can I create affiliate-specific landing pages?

To create personalized landing pages for affiliates, use dynamic tags in the program’s landing page URL. Supported tags include:
  • Affiliate ID (${affiliate.id})
  • First name, last name, and email
  • Custom metadata fields (e.g., ${affiliate.meta_data[organization_id]}) You can also append UTM parameters (e.g., utm_source, utm_campaign) to track campaign performance. For multiple destinations, create text link assets for each URL and assign them to the program. Affiliates can access these links in their dashboard, ensuring tracking remains intact.