Home
Offers & Tracking
Tracking Fundamentals
JavaScript SDK: Accessing & Editing Impression, Click, and Conversion Scripts
JavaScript SDK: Accessing & Editing Impression, Click, and Conversion Scripts

SERIES:

JavaScript SDK: Accessing & Editing Impression, Click, and Conversion Scripts

A comprehensive guide to Everflow's JavaScript SDK tracking scripts (Impression, Click, and Conversion), explaining how to implement and configure tracking parameters for accurate affiliate marketing measurement, including optional settings like Sub IDs, Source ID, and conversion-specific macros.

Overview

This article will show you a complete breakdown of all the JavaScript SDK scripts and associated settings & macros that you’re able to configure.

What's Changed Last updated August 28, 2026
August 28, 2026 Added
Added Firing A Specific Conversion Event, covering the Conversion Event dropdown and the adv_event_id and event_id parameters, including where each ID is found.
August 28, 2026 Fixed
Corrected the Sub ID and Advertiser ID counts. Both said Everflow provides 5 and then listed ten.
May 18, 2026 Updated
Sub ID and Advertiser ID slots expanded from 1–5 to 1–10. All three script types (Impression, Click, Conversion) now support the expanded sub1sub10 and adv1adv10 parameter ranges. Add sub6sub10 or adv6adv10 to your scripts the same way as the lower-numbered slots.
For an introduction to how tracking works with the JavaScript SDK, please read this guide.

Accessing The Scripts

Heads Up! In order to have access to Impression Tracking, the Impressions add-on package must be turned on.

All three scripts can be found in the same place, here’s how to access them:

In the sidebar, click on Offers -> Manage Click on an Offer name which takes you the Offer Details page In the Offer Details page, find the Tracking card On the Tracking card, you’ll find the Impression (if the package is turned on), Click & Conversion Scripts.

How Do I Install These Scripts?

Each of these scripts needs to be installed on the Advertiser's webpage/app. Please read our API Docs for detailed information on how to use each script.

Note We also recommend checking out our article on Direct Linking Between Two Everflow Networks to get step-by-step instructions for implementing direct linking between separate Everflow networks using the JavaScript SDK.

Script Breakdowns

Impression Script

The Impression Script should be triggered when the Tracking Link or Ad is viewed/receives an Impression.

The default, unedited script looks like:

The most important entities here are “offer_id” and “aff_id”, which help associate the Impression with the correct Offer and Partner (Affiliate) that drove the Impression.

All the other parameters are optional.

Please read our API docs for a detailed reference to the Impression Script.

Click Script

The Click Script is generally triggered on page load, when the visitor clicks on a Tracking Link and lands on the Default Landing Page on the Advertiser’s webpage/app.

Please read this guide for a reminder on Click Tracking and Linking Types.

The default, unedited script looks like:

The most important parameters here are “offer_id” and “aff_id” when using Direct Linking & the “transaction_id” when using Redirect Linking, which help associate the Click with the correct Offer and Partner (Affiliate) that drove the Click.

Please read our API docs for a detailed reference to the Click Script.

Conversion Script

The Advertiser should fire off the Conversion Script every time there is a Conversion Event. Each Offer can have multiple Conversion Events associated with it.

As a reminder, here’s a guide on how Conversion Events work.

The default, unedited script looks like:  

Firing A Specific Conversion Event

The script above fires the Offer’s base conversion. If the Offer has additional Conversion Events, you need to tell Everflow which one you are firing, and you do not have to build that script yourself.

On the Tracking card, open the CONVERSION tab and pick the event from the Conversion Event dropdown. Everflow regenerates the Javascript SDK snippet below it with that event’s ID already filled in. Copy the regenerated script. That is the one to install.

Offer Tracking card, CONVERSION tab: the Conversion Event dropdown reads (212) AI Playbook Recipe Submit while the generated Javascript SDK snippet below emits adv_event_id 42

Note what the two highlights say. The dropdown is labelled (212) and the script it generated passes adv_event_id: 42. Those are two different IDs for the same event, which is why copying the number out of the dropdown does not work.

The number in the dropdown is not the number in the scriptThe Conversion Event dropdown labels each event with its OFFER-level event ID, for example (212) AI Playbook Recipe Submit. The script Everflow generates does not use that number. It uses adv_event_id, which is the ADVERTISER-level event ID, and the two are different values. If you hand-write the script using the number you saw in the dropdown, the event will not register. Let Everflow generate the script, or take the ID from the Advertiser as described below.

The two IDs live in different places, which is the single easiest thing to get wrong here:

ParameterWhich ID it takesWhere to find it
adv_event_idThe Advertiser-level event ID. One Advertiser event can be associated with several Offer events, so this works across Offers.Advertisers > Manage > select the Advertiser > the Events tab. The ID column holds the value, and Associated to shows how many Offer events use it.
event_idThe Offer-level event ID. Specific to one Offer.Offers > Manage > select the Offer > the Revenue & Payout tab. It is also the number shown in brackets in the Conversion Event dropdown.

You can pass either one. Use adv_event_id when the same event is tracked across several Offers, and event_id when it belongs to one Offer only.

Advertiser Details Events tab with the ID column highlighted, showing advertiser event IDs 6, 5, 4 and 1 against their event names

The ID column on the Advertiser’s Events tab is the value to pass as adv_event_id. The Associated to column beside it shows how many Offer events share that Advertiser event, which is what makes one adv_event_id work across several Offers.

Firing the same event through a postback instead of the SDK? The parameters are identical. See Accessing & Editing S2S Postback URLs for the postback syntax, and How To Set Up Conversion Events for creating the events in the first place.

Passing Offer ID vs Advertiser ID In The Conversion Script

As an alternative to the script above, you can also fetch a version of the Conversion Script that passes the Advertiser ID instead of the Offer ID. Here’s how to switch between the two:

Here’s what the script would look like in that scenario:

The “offer_id” has been replaced here by the “aid”. The only reason to switch between the two is to use Offer Level vs Advertiser Level attribution depending on the parameter that has been passed to Everflow. To understand Offer Level vs Advertiser Level attribution, please read this guide.

Please read our API docs for a detailed reference to the Conversion Script.

Understanding Optional Parameters

Accessing Optional Parameters

In order to access Optional Parameter settings:

  1. Using the instructions earlier in this article, find the Tracking card in Offer Details view for an Offer
  2. For each script, you’ll see Edit Optional Parameters below code block

Click & Impression Script Related Parameters

NoteThe Click & Impression Scripts share Optional Parameters. It’s the exact same parameters for both, and editing a parameter will edit it for both at the same time.
__wf_reserved_inherit

Sub IDs

Everflow provides 10 Sub IDs, namely: sub1, sub2, sub3, sub4, sub5, sub6, sub7, sub8, sub9, sub10. Generally, it’s to be used by your Partners to send any kind of information over to Everflow that relates to an Impression or Click. But customers are also able to override Sub ID values if needed.

An example would be Partners sending categorical information relating to anything like sale events, specific affiliate names, geo, etc. during the Click. It could be anything.

The big idea being, Impressions & Clicks can be broken down by sub_id’s in Everflow’s Core Platform reports. This helps customers make better decisions around campaign optimization, payouts and more.

Source ID

Use the Source ID to pass in traffic sources like “Meta”, “Google”, or anything else that might fit the description for “source”.

Conversion Script Optional Parameters

The Conversion Script has its own set of optional parameters, separate from the Click and Impression ones above.

__wf_reserved_inherit

Advertiser IDs

Everflow provides 10 Advertiser IDs, namely: adv1, adv2, adv3, adv4, adv5, adv6, adv7, adv8, adv9, adv10. These Advertiser IDs are only applicable to the Conversion Script. Everflow customers can use these macros to send any kind of metadata and associate it with the conversion.

Just like Sub IDs, you will be able to filter and pivot your Conversion related reports on the Advertiser ID values. This helps customers make better decisions.

Amount

Use the Amount macro to send sale related information. RPS (Revenue per sale) related Offers generally need this info.

Email

Attribute an email address to the conversion by passing it in via the Email macro.

Coupon Code

Attribute a coupon code to the conversion by passing it in via the Coupon Code macro.

Order ID

Send in Order IDs (eg: when using E-Commerce integrations like Shopify), to associate order information to the conversion.

Important Notes On Impression Tracking

Impressions And Clicks Are Tracked Separately

Firing the Impression Script only generates an Impression. It does not also register a Click. Nothing is implicit. If you want both an Impression and a Click to be recorded, you must fire both EF.impression and EF.click separately.

Note Because third-party cookies are not reliable, firing EF.impression on one domain and EF.conversion on a different domain will not work as expected. Plan your placements with this in mind.

View-Through With Direct Linking Is Not Supported

View-Through attribution is not possible when using Direct Linking, because Everflow is not redirecting through its system at all. The impression link field available in Direct Linking is only meant as a way to record an Impression from a creative view (if the JavaScript is placed there). Everflow cannot pass a transaction_id from that Impression through to the Advertiser.

View-Through attribution is set at the Offer level, so it does not change how EF.impression is used. To generate an Impression that you can later convert on, the Offer must be set up for View-Through. This is not only about the redirect, it is also about how the Impression is handled on the Everflow side. When set up this way, EF.impression returns a transaction ID and sets a first-party cookie, allowing the conversion to be associated correctly.

Passing Coupon Codes At The Impression Level

In addition to the Conversion Script, you can also pass a coupon code on the Impression Script using the coupon_code parameter in the JavaScript SDK. For example, to capture a coupon code from the utm_source URL parameter, the Impression Script would look like: