Skip to main content

Enhanced Attribution Script

Learn more how to add another layer of attribution to your tracking links

Updated over a week ago

Overview

The Enhanced Attribution Script (EAS) is an advanced method for tracking affiliate conversions by placing a script on a seller's landing page. This script passes attribution data via the URL to ensure affiliates receive proper credit for conversions.

Working alongside cookies and device fingerprinting, the EAS significantly improves overall tracking accuracy for all ClickBank affiliate links.

Additionally, the script enables affiliates to use Direct Tracking Links, which allow traffic to go directly to the seller’s landing page without routing through a HopLink.

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 Enhanced Attribution Script on their landing pages, it improves attribution by passing the Hop ID in the URL. This benefits all affiliates, whether they use a standard HopLink or a Direct Tracking Link.

With the Enhanced Attribution Script

  • The Hop ID is automatically passed to the seller’s payment links, improving tracking accuracy.

  • Even standard HopLinks benefit, thanks to more reliable tracking.

  • Enables use of Direct Tracking Links, which avoid redirects while preserving full attribution.

Without the Enhanced Attribution Script

  • Hop ID is generated by the standard HopLink.

  • If the script is not present, the Hop ID is not automatically carried through to the payment link.

  • Tracking then relies solely on cookies and fingerprinting, which are less reliable.


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 track conversions even if cookies are lost, ensuring proper affiliate credit.


How the Enhanced Attribution Script Works

Scenario 1: Using a HopLink

  1. Customer clicks a standard HopLink.

  2. ClickBank stores attribution, creates a tracking cookie, and redirects the user to the seller’s landing page with a hopid in the URL.

  3. The customer lands on the page. The script detects the hopid and rewrites payment links to include it.

  4. When the customer clicks a payment link, the order form loads with the hopid in the URL.

  5. Attribution is confirmed via the cookie, fingerprint, and hopid.

Scenario 2: Using a Direct Tracking Link

  1. Customer clicks a Direct Tracking Link and lands on the seller’s page.

  2. The script sends attribution info to ClickBank, sets a cookie, and generates a hopid.

  3. The hopid is added to the URL and the payment links.

  4. When the customer clicks a payment link, the order form includes the hopid.

  5. Attribution is matched using all three signals.


Placing the Enhanced Attribution Script

To ensure accurate tracking, sellers must place the script on:

  • The initial landing page.

  • All intermediate pages a customer may visit before the order form (e.g., funnel pages, alternate VSL pages).

Missing the script on any step can break attribution.


How to Add the Script

  1. Copy the script from your account nickname.

  2. Paste it in the <head> section of your HTML, just before the closing </head> tag.

Important: If your page doesn’t display payment links on load (e.g., a VSL must finish first), adjust your implementation. See Advanced Implementation Instructions for help.


Where to Find the Enhanced Attribution Script

Step 2: Select Accounts.

Step 3: Click the account nickname you want to work in.

DOTA-3.jpg

Step 4: Select Vendor Settings and then My Site.

DOT-4.jpg

Step 5: Locate the Direct Offer Tracking section and copy the script.

DOT-5.jpg

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.

DOT-6.jpeg


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:

  1. Your page loads a VSL.

  2. After it finishes, a script dynamically adds payment links.

  3. Modify this script by adding:

finishHop();

This ensures dynamically added links include proper attribution.


Testing the Script

  1. Create a standard HopLink or Direct Tracking Link.

  2. Click the link and navigate to the page.

  3. Inspect the payment links.

If hopid appears in the URLs, the script is working properly.


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 or shield 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

disabled

Direct Tracking Links are disabled for the seller.

invalidnickname

Affiliate does not have a ClickBank account.

invalidSite

Invalid characters in seller or affiliate nickname, or duplicate names.

accntstate

Affiliate account is suspended, terminated, or missing.

invalidtarget

The Hop destination in your marketplace listing is invalid.

afblacklisted

The affiliate has been blocked from promoting this offer.

nowhitelist

Affiliate approval is required, but this affiliate isn’t allowed.

internalerror

Internal ClickBank issue—contact support.

Did this answer your question?