Everflow JS SDK / Direct Linking Guide - Facebook / Google Ads : Helpdesk

Everflow JS SDK / Direct Linking Guide - Facebook / Google Ads

FAQs

What is direct linking?

This functionality allows a click to be generated when a user hits the landing page instead of having to direct them to click an Everflow tracking link and be redirected. That click is still unique to the affiliate and offer. The main reasons for using this are to improve the user experience as well as get around any potential third party tracking link issues with Facebook and Google.

How is this different from regular Everflow tracking?

This is different because the click is generated when the user hits the landing page itself - there is no redirect happening so we enforce caps and targeting in Everflow reporting (by not registering clicks that are invalid due to cap/targeting). The user, however, will always land in the landing page and the advertiser will see all clicks - including those defined as invalid in Everflow. It also requires that you either own the page yourself or the advertiser will let you place Javascript on their page. Fail traffic redirect will not work. smart link not possible.

How does the conversion tracking work here?

For server 2 server tracking, the transaction ID will be created when the click pixel is fired on the advertiser destination page. This ID can be stored in the cookie or local storage. On a conversion event - the TID will need to be stored and fired back to Everflow using a postback url. For cookie-based tracking, you will need to implement a conversion tracking code which can be found at the bottom of this page. It will allow you to also use a transaction ID - if no transaction ID is found we will use fingerprinting to attribute the conversion. 

*IMPORTANT* Make sure to use the same domain in this part of the code for both conversion and click tracking: https://(Domain in your standard tracking links)/scripts/sdk/everflow.js

How to turn this on at the offer level

Please go to Offers > Manage > click the offer > edit > tracking & controls and turn direct linking from Red to Green

*IMPORTANT* Please note that direct linking will still work even if this is turned off but what this toggle does is generate affiliate tracking links with this schema: https:(destinationurl_link).com/?oid=(we_insert_offer_id)&affid=(we_insert_affiliate_id) .

Usage

Click tracking(Direct Linking)

Place the below code to be triggered on an advertiser landing page on a click event to pass click info back to everflow.

When working with direct linking, your affiliate id will most likely be dynamic. In order to dynamically set the affiliate id, use the following method to extract any URL value. In the following scenario, the script executes on a landing page with the affid url parameter (https://destination-url.com?affid=5)

<script type="text/javascript" src="https://(Domain 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'),

   uid: EF.urlParameter('uid') //This will capture the Offer URLs, make sure to include &uid= in the partner tracking link. 

// 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: '',
   sub2: '',
});
</script>


Conversion Tracking(Conversion SDK)

Place the below code to be triggered on an advertiser landing page on a conversion event to pass conversion info back to everflow.

<script type="text/javascript" src="https://(Domain in your standard tracking links)/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
EF.conversion({
       offer_id: [Your Offers ID], // Required(only if advertiser_id is not present). 
       advertiser_id: [Your Advertisers ID], //Required(only if offer_id is not present). 

       transaction_id: EF.urlParameter('tid'), // Optional. Returned from partners using an Everflow tracking link redirect.

       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 - your Shopping Cart may be able to generate this dynamically.

       event_id: [Your Event's ID], // this is required if you are placing this for an offer level event . 
       adv_event_id: [Your advertiser Event's ID], // this is required if you are placing this for an advertiser event . 
  })
</script>


HTML

Impression Tracking

its also possible to add impression tracking with the JS SDK, navigate to the offer>general and grab your offer/affiliate specific impression tracking pixel that needs to be placed by the publisher. Please Note that View through attribution will not work with this setup. We can still attribute to the impression if a click isn't present(click always takes precedence). We will just not be able to load the url in the view through attribution section on the attribution page when editing the offer. 



Advanced Tips

Campaigns with Multiple Points of Entrance - If you have several different ways users will reach the advertisers' websites, such as multiple landing pages that you're testing, then you will need to place the same SDK JS Tag on every single one of the landing pages.  

Campaigns with Multiple Events - As mentioned above, you will need to place the conversion tag on the confirmation page for each successful Event's conversion, and manually update the JS Tag to match up the Event ID with the ID listed in your Offer's setup.

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

Direct Linking and using redirect links at the same time - You can use both direct linking and redirect links on the same offer if you do not turn on direct linking when setting up the offer and place the javascript click pixel like this (follow instructions for using &tid= in the destination url please):

<script type="text/javascript" src="https://(Domain 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'),
   transaction_id: EF.urlParameter('tid'),  //make sure to use &tid={transaction_id} in the base destination url for an offer that uses redirects and direct linking at the same time. 

// 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: '',
   sub2: '',
});
</script>

Passing more data in the EF.click script - You can append more data to the destination url string in order to pass that into the sub spots to view it in Everflow. To do this please add more spots to the script like this:

<script type="text/javascript" src="https://(Domain 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'),
});
</script>

Please note that you have to add these parameters to the 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

Grabbing the transaction ID from the landing page after a click is generated - In order to do this you need to add this script to the landing page:

Please replace OFFER_ID with the actual ID of the offer. You can use the EF.getTransactionId() method to grab that value. This will allow you to use it where ever you would like.

 <script type="text/javascript" src="https://(Domain in your standard tracking links)/scripts/sdk/everflow.js"></script>

     <script type="text/javascript">
      EF.getTransactionId(OFFER_ID);
     </script>


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.