Skip to main content
All CollectionsOffersSetup & ManagementTracking & Controls
Conversion Method: Javascript SDK (JS SDK) (Direct Linking + Redirect)
Conversion Method: Javascript SDK (JS SDK) (Direct Linking + Redirect)

How to set up your conversion tracking with Direct Linking using the Javascript SDK (JS SDK) EF.click() and EF.conversion() scripts

Genny avatar
Written by Genny
Updated over 8 months ago

Overview

Our Javascript SDK provides a simple Conversion Method that enables you to track a user's click when they reach your landing page without requiring a click on an Everflow Tracking Link.

Our Javascript SDK is often paired with Direct Linking for a seamless tracking experience. Direct Linking utilizes Everflow's Javascript SDK to remove the traditional redirect that comes with a tracking link. This improves the User's experience, and allows for Partners to promote through channels that prohibit third-party links, like Facebook and Google.

Please note the Javascript SDK is not optimized for Internet Explorer.

  • For the Everflow JS SDK Documentation - [Click Here]

  • For information about how to choose a Conversion Method - [Click Here]

  • For JS SDK Conversion Method with Redirect Partner Tracking Links - [Click Here]


Setting Up Direct Linking

Step #1

  • Navigate to Offers - Manage

  • Then click the desired Offer.

Step #2

  • Click Edit, then click on the Tracking & Controls tab.

  • Under Conversion Method, select JavaScript SDK.

(Optional) Turn on the Use Direct Linking toggle if you would like to use direct links instead of traditional redirect tracking links.

Please note that when Direct Linking is enabled, and {offer_id} and {affiliate_id} are used in the Base Destination URL, the macros are automatically populated when generating a tracking link.

Step #2A

  • Navigate back to the offer page by clicking Save.
    To set up Click tracking, be sure you are looking at the Click tab within the Tracking card, as shown below.

  • Place the Click JavaScript on the landing page you will be using for Partner traffic. To track all Partner traffic across your entire website, place the Click JavaScript in your global footer.

Step #2B

To set up Conversion tracking, be sure you are looking at the Conversion tab within the Tracking card, as shown below. Click Edit Optional Parameters to expand the list of values you can append to the script.

  • Select the Domain used for the conversion.

  • Select which Conversion to track. (i.e Base or Event)

  • Select either Offer ID, to build a script that will work for this specific Offer only, OR the Advertiser ID, which can track multiple offers associated with this Advertiser.

  • (Optional) Include additional parameters in the conversion code. See more info.

  • Place the Conversion JavaScript on your Confirmation/Thank You Page to record Conversion data in your Everflow portal.

**Troubleshooting Tip: If Amount is being fired in the Conversion Script, a numeric or string value must be passed in order to process a valid Conversion in Everflow. If the Amount field is blank, the conversion will not be fired into Everflow.


**Advanced Guide**

Impression Tracking

Tracking impressions through Direct Linking. Please note that we still attribute the conversion from the impression if there isn't a click fired, but the click will take precedence for attribution.

Customized Parameters for Direct Linking

If you would like to customize the parameters used for Direct Linking clicks:

  • navigate to Advertisers - Manage > Select Advertiser > Edit > Select Additional Information Tab > Edit under Direct Linking.

Additional Parameters for Click Script

You can pass more data to the Base Destination URL string using Sub IDs by adding more parameters to the Click Script like this:

<script type="text/javascript" 
src="https://(DOMAIN_USED_IN_YOUR_STANDARD_TRACKING_LINKS)/scripts/sdk/everflow.js"></script>

<script type="text/javascript" >
EF.click({
offer_id: EF.urlParameter('oid'),
affiliate_id: EF.urlParameter('affid'), // Optional. You can hard code additional information to be tracked with the click. EX: sub1: 'Facebook', (In order to pass, you need to move that section above the // Optional section)
sub1: EF.urlParameter('value1'),
sub2: EF.urlParameter('fb_campaign_value'),
sub3: EF.urlParameter('name'),
sub4: EF.urlParameter('campaign_id'),
sub5: EF.urlParameter('data_point2'),
uid: EF.urlParameter('uid'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id'),
});
</script>

Please note that you must add these parameters to the Base Destination URL following that example:

https://destination-url.com?affid=5&oid=1&value1={INSERTDATA}&fb_campaign_value={INSERTDATA}&name={INSERTDATA}&campaign_id={INSERTDATA}&data_point2={INSERTDATA}

Additional Parameters for Conversion Script

You can pass back additional parameters in the Conversion Script, including the following:

<script type="text/javascript" src="https://(DOMAIN_USED_IN_YOUR_STANDARD_TRACKING_LINKS)/scripts/sdk/everflow.js"></script>

<script type="text/javascript">EF.conversion({

offer_id: [Your Offers ID], // ( Required if aid is not present).

aid: [Your Advertisers ID], // ( Required if offer_id is not present).

amount: 0, // Optional. Purchase amount used for RPS offers - your Shopping Cart may be able to generate this dynamically.

coupon_code: '', // Optional. Coupon code used, also applicable for impression tracking - your Shopping Cart may be able to generate this dynamically.

event_id: [Your Event's ID], // required for tracking an offer level event .

adv_event_id: [Your Advertiser Event's ID], // required for tracking an advertiser level event . })</script>

Using Direct Linking and Coupon Code Tracking URLs

To use this method with Direct Linking, you will need to do the following:

  1. Set Conversion Method to JavaScript SDK.

  2. Deactivate the Direct Linking toggle.

  3. Under General, add &tid={transaction_id} to the Base Destination URL.

  4. Modify your existing Click Script by adding the following inside the EF.click{[ section:

    transaction_id: EF.urlParameter('tid'),

Once set up, your Coupon Code Tracking URL will redirect traffic to your normal destination URL, which will include all of the necessary details for the JS SDK Script to track the user properly.

Campaigns with Multiple Points of Entrance

If you have several campaigns with multiple points of entrance where users will reach the advertisers' websites, such as multiple landing pages that you're testing, then you will need to place the same Click Scripts on every single one of the landing pages.

Campaigns with Multiple Events

For Campaigns with Multiple Events, you will need to place the Conversion Script on the confirmation page for each successful Event. On the Tracking card, select the Conversion tab. Choose the Event from the dropdown and paste this script on the page where the Event occurs.

Google Ad Buying

You can instead use Parallel Tracking for tracking this channel, if preferred - [See Parallel Tracking Guide]

Using Verification Token for added security

If you have verification token enabled for a specific advertiser for added security, the verification token will be automatically included in associated Conversion Scripts. For more about Verification Tokens - [Click Here]

Passing Media Cost

You can pass the Media Cost of an impression or a click to dynamically adjust the Payout. For more info - [Click Here]

Using Direct Linking AND Redirect Links Together

You can use both Direct Linking and redirect links on the same offer by enabling Direct Linking when setting up the offer. The following parameters/macro need to be added to the Base Destination URL: &_ef_transaction_id={transaction_id}.

Below is the standard JS Click Script available in the Tracking card in the General tab of an Offer:

<script type="text/javascript" 
src="https://www.EXAMPLE_TRACKING_DOMAIN.com/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
EF.click({
offer_id: EF.urlParameter('oid'),
affiliate_id: EF.urlParameter('affid'),
sub1: EF.urlParameter('sub1'),
sub2: EF.urlParameter('sub2'),
sub3: EF.urlParameter('sub3'),
sub4: EF.urlParameter('sub4'),
sub5: EF.urlParameter('sub5'),
uid: EF.urlParameter('uid'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id'),
});
</script>

Base Destination URL example:

https://www.ExampleLandingPageDomain.com/?_ef_transaction_id={transaction_id}

Cross Site Tracking (same root domain)

When Cross Site Tracking, you can use a landing page in front of your website with the same root domain as the site where the Conversion Script is placed you can set a cookie on the root domain.

Example

  • landing page: partners.everflow.io

  • end site (with Conversion Script): www.everflow.io

You can use this method before the Click Script is triggered to register the cookie on the root domain, instead of the root domain + subdomain combination.

EF.configure({tld: "domain.com"});

Replace domain.com with the root domain. Below is an example Click Script for placing on the landing page:

<script type="text/javascript" 
src="https://(DOMAIN_USED_IN_YOUR_STANDARD_TRACKING_LINKS)/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
EF.configure({tld: "everflow.io"});
EF.click({
offer_id: EF.urlParameter('oid'),
affiliate_id: EF.urlParameter('affid'),
sub1: EF.urlParameter('sub1'),
sub2: EF.urlParameter('sub2'),
sub3: EF.urlParameter('sub3'),
sub4: EF.urlParameter('sub4'),
sub5: EF.urlParameter('sub5'),
uid: EF.urlParameter('uid'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id'),
});
</script>


Did this answer your question?