Home
Offers & Tracking
Tracking Fundamentals
Understanding Tracking With The JavaScript SDK
Understanding Tracking With The JavaScript SDK

SERIES:

Understanding Tracking With The JavaScript SDK

Learn how to implement precise tracking with Everflow's JavaScript SDK, capturing clicks, conversions, and impressions directly on your web pages to optimize marketing performance and gain deeper campaign insights.

Overview

In the dynamic landscape of digital marketing, precise and efficient tracking is crucial. Everflow's JavaScript SDK offers a powerful solution for seamless integration and enhanced data collection directly on your web pages. This lightweight tool empowers you to capture valuable user interactions and conversions with greater accuracy and flexibility.

Let's explore how the JavaScript SDK can simplify your tracking processes and provide deeper insights into your campaign performance within the Everflow platform.

What Can You Track With The JavaScript SDK?

When it comes to the JavaScript SDK, you’re able to track:

  1. Impressions - via the Impression Script
  2. Clicks - via the Click Script
  3. Conversions - via the Conversion Script
NoteImpressions are available as an add-on package, and you might not see the Impression Script unless you have the package turned on.

How Is Tracking With The JSDK Different From S2S Postbacks?

When it comes to S2S Postback Tracking Method, it is solely for tracking Conversion Events. Whereas the JavaScript SDK is able to track Impressions, Clicks & Conversion Events.

Another big difference is that the JavaScript SDK relies on First-Party Cookies being stored on the Advertisers webpage/app. If you’re looking for a Cookie-less solution, please check the S2S Postback Tracking Method.

How Does The Javascript SDK Work?

When using the JavaScript SDK you’ll generally use the Click Script & the Conversion Script together.

A Reminder On Linking Types

Conversions generally happen after Clicks, and it’s very important to first select your Click Tracking type.

If you haven’t decided on the types of Click Tracking, here’s an introduction to the concept.

The JavaScript SDK can be used with both Linking Types, even though it’s generally paired with Direct Linking. In order for Direct Linking to work, you are required to use the JavaScript SDK’s Click Script.

Tracking Clicks

In order to understand any Conversion Tracking Method, we need to understand Clicks. As mentioned above, the JavaScript SDK provides a Click Script. The Click Script is essential when using Direct Linking, but also supports tracking with Redirect Links.

For a complete breakdown of the Click Script and its macros, please refer to this guide.

The simple idea is, once a Click has happened, that Click will generate a Transaction ID. This Transaction ID, will be associated with a Partner (usually an Affiliate), and an Offer.

With Direct Linking

Since Direct Linking needs the Click Script to record the Click, let’s talk about how this scenario works.

Here’s a primer on Direct Linking if you’re not familiar with how it works.

With Direct Linking, the visitor clicks on the Tracking Link and is directly brought to the Default Landing Page URL on the Advertiser’s webpage/app. Once they land on the Default Landing Page:

  1. The Advertiser fires off the Click Script when the visitor lands on the Default Landing Page
  2. The Click Script fetches the Offer ID & Affiliate ID (along with other macros that may be present) from the URL parameters, and sending them to Everflow
  3. Everflow generates a Transaction ID (TID) and records a Click
  4. The Everflow server returns the TID as the response as well as set’s a First Party Cookie with the TID

At this point, the Click has been recorded in Everflow, and the Cookie with the TID value has been set on the browser in order to be consumed by the Conversion Script that we’ll learn about later.

With Redirect Linking

Redirect linking works a little differently.

Here’s a primer on Redirect Linking if you’re not familiar with how it works.

Once a visitor clicks on a Redirect Link and lands on the Default Landing Page, the URL will have the Transaction ID parameter appended to it. Meaning, the Click has already been recorded before reaching the Default Landing Page.

In this case:

  1. The Advertiser fires off the Click Script when the visitor lands on the Default Landing Page
  2. The Click Script will fetch the Transaction ID from the URL parameters, sending them to Everflow
  3. Everflow sees that a TID has been received in the call, and knows that the Click has already been recorded
  4. The Everflow server returns the TID as the response as well as set’s a First Party Cookie with the TID

Similar to the Direct Linking scenario, at this point, the Cookie with the TID value has been set on the browser in order to be consumed by the Conversion Script that we’ll learn about below.

Tracking Conversions

The fun part is tracking Conversion Events & the Conversion Script is fairly simple.

Here’s how it functions:

  1. The Advertiser fires off the Conversion Script when the visitor conversion (eg: the visitor makes a purchase)
  2. The Conversion Script looks for the TID in the First Party Cookie set by the Click Script earlier, and sends the TID as well as Offer ID or Advertiser ID (depending on the config) to Everflow
  3. Everflow servers use the above information to record a Conversion and associate it with the correct Click, Affiliate, Offer & Conversion Event.
For a complete breakdown of the Conversion Script and its macros, please refer to this guide.

That is the entire process of tracking Clicks & Conversions with the JavaScript SDK.