Overview
ClickBank’s Enhanced Attribution Tracking Script enhances affiliate attribution tracking by adding URL-based tracking alongside cookies and device fingerprinting. When placed on a seller’s landing page, the script passes a Hop ID—the unique click identifier generated from the affiliate link—through the URL to the order form, improving conversion attribution for affiliates.
This script benefits all ClickBank affiliate links, including both HopLinks and Direct Tracking Links, by reducing lost attributions due to browser switching, blocked or cleared cookies, or device-limited fingerprinting.
While the Attribution Tracking Script is required to enable Direct Tracking Links, it also improves standard HopLink tracking, making it beneficial for all sellers. Because of these broad attribution improvements, we strongly recommend sellers add the script to their landing pages, even if they don’t plan to enable Direct Tracking Links. Related:
NOTE: We highly encourage sellers to implement the Enhanced Attribution Script—even if they don’t plan to offer Direct Tracking Links—because it greatly enhances affiliate attribution.
How the Enhanced Attribution Script Improves Affiliate Attribution
When sellers embed ClickBank’s Attribution Tracking Script on their landing pages, it improves attribution by passing the Hop ID —the unique click identifier generated from the affiliate link—through the URL to the order form. This benefits all affiliates, whether they use a standard HopLink or a Direct Tracking Link.
How It Works:
Without the Attribution Tracking Script:
When an affiliate promotes a seller using a standard HopLink, a Hop ID is generated. However, if the seller’s page does not have the attribution tracking script, the Hop ID is not carried through the URL when the customer clicks on a payment link. This means tracking relies on cookies and fingerprinting, which can be less reliable.With the Attribution Tracking Script:
The script ensures the Hop ID is automatically passed through the seller’s payment links, improving attribution.
Affiliates benefit from this even if they use a standard HopLink, because the tracking is more reliable.
If the seller has added the script, affiliates also gain the option to use Direct Tracking Links, which avoid redirects while still preserving attribution.
Why This Matters for Attribution
ClickBank’s default tracking includes first-party cookies and device fingerprinting, but these methods have limitations:
Browser Switching
If a customer switches browsers (common on platforms like Facebook or TikTok), tracking data may be lost.
Privacy Settings
Browsers may block or clear cookies based on privacy settings.
Fingerprinting Limitations
Some devices limit fingerprinting accuracy.
By passing the Hop ID in the URL, ClickBank can still track conversions even if cookies are lost. This ensures that affiliates receive proper credit for their referrals, making the Attribution Tracking Script a valuable tool for all affiliates—regardless of the type of link they use.
How the Enhanced Attribution Script Works
Scenario 1: Using a HopLink
Customer clicks a HopLink.
ClickBank stores the attribution information, creates a tracking cookie, and redirects the user to the seller’s landing page. The hopId query parameter is added.
The customer arrives on the seller’s landing page. The tracking script detects the hopId is already present, and rewrites the payment links to include the hopId.
Customer clicks on the payment link and the order form loads with the hopId in the URL. ClickBank looks for the affiliate attribution through the cookie, fingerprint, and hopId.
Scenario 2: Using a Direct Tracking Link
Customer clicks a Direct Tracking Link and arrives on the seller’s landing page.
The tracking script sends the attribution information to ClickBank, creates a tracking cookie, and generates a hopId.
The tracking script adds the hopId to the URL and payment links are rewritten to include the hopId.
Customer clicks on a payment link and the order form loads with the hopId in the URL. ClickBank looks for the affiliate attribution through the cookie, fingerprint, and hopId.
Placing the Enhanced Attribution Script
Ensuring Full Tracking Coverage
To ensure full tracking coverage, the Attribution Tracking Script must be placed by the seller on:
The landing page where customers first arrive.
All pages customers may navigate through before reaching the order form (e.g., multi-step funnels). This includes any alternative pages/paths customers may visit when exiting the landing page (e.g., a text-only version of a VSL).
If the script is missing from any step in the flow, the Hop ID could be lost, reducing attribution accuracy.
Placing the Attribution Tracking Script
Copy the code from your Seller Account and place it in the <head> section of your HTML, just before the closing </head> tag.
Important: If your offer page does not display a payment link on page load (e.g., a VSL that must play to completion before revealing the payment link), you must adjust your page setup to ensure tracking functions correctly. For more details, refer to the Advanced Implementation Instructions.
Where to Find the Enhanced Attribution Script
Step 1: Log in to your ClickBank account.
Step 2: Select Accounts.
Step 3: Click the account nickname you want to work in.
Step 4: Select Vendor Settings and then My Site.
Step 5: Locate the Direct Offer Tracking section and copy the script.
NOTE: If you wish for affiliates to be able to create direct tracking links in the HopLink Generator, the checkbox for Enable Affiliates for Direct Offer Tracking must be checked.
Advanced Implementation: Delayed Payment Links
If your payment links are displayed after an event (e.g., after a VSL completes), you'll need to update your script setup.
When the script runs, it makes a global JavaScript function available: finishHop()
. This function updates all ClickBank payment links with the Hop ID.
Example Scenario:
Your page loads a VSL.
After it finishes, a script dynamically adds payment links.
Modify this script by adding:
finishHop();
This ensures dynamically added links include proper attribution.
Testing the Script
Create a standard HopLink or Direct Tracking Link.
Click the link and navigate to the page.
Inspect the payment links.
If hopId
appears in the URLs, the script is working properly.
Disabling Direct Tracking Links
Sellers who do not want affiliates to use Direct Tracking Links can disable this option by unchecking the Enable Direct Tracking Link checkbox in their account settings.
When disabled:
Affiliates will not have the option to generate Direct Tracking Links in the HopLink Generator.
The Marketplace will not indicate that Direct Tracking is available for that seller.
Any existing Direct Tracking Links will not provide attribution and will redirect to an error page instead of tracking the affiliate's referral.
Troubleshooting
Issue: No Affiliate Clicks (Hops)
Step 1: Confirm Affiliate Attribution Make sure the affiliate is passed using:
URL:
?affiliate=username
or?shield=username
HTML:
affiliate
orshield
object property
Step 2: Check Browser Console
Open Developer Tools > Console
Look for tracking errors (e.g.,
Unable to track user. Reason: [error code]
)
Common Error Codes
Error Code | Description |
| Direct Tracking Links are disabled for the seller. |
| Affiliate does not have a ClickBank account. |
| Invalid characters in seller or affiliate nickname, or duplicate names. |
| Affiliate account is suspended, terminated, or missing. |
| The Hop destination in your marketplace listing is invalid. |
| The affiliate has been blocked from promoting this offer. |
| Affiliate approval is required, but this affiliate isn’t allowed. |
| Internal ClickBank issue—contact support. |