Skip to main content
All CollectionsHow To - Advanced Guides
Pre-landers, Offer Walls and Listicles
Pre-landers, Offer Walls and Listicles

How to set up a pre-lander, offer wall or listicle with a coding sample for reference

Genny avatar
Written by Genny
Updated over 2 months ago

Table of Contents


Using Traditional Redirects

**Please note that general knowledge of coding with HTML and JavaScript is required to complete this process.

General Concept and Reporting

The offer wall / listicle will exist as one offer, while each offer within that offer wall / listicle will also exist as individual offers. In reporting, you will see the clicks that are going to the offer wall / listicle as well as the clicks to each of those individual offers.

Code Example

Both HTML and Javascript to be placed on the offer wall / listicle page:

HTML:
<a href="XXX" id="button-1"><button>Button 1</button></a><br><br>
<a href="XXX" id="button-2"><button>Button 2</button></a><br><br>
<a href="XXX" id="button-3"><button>Button 3</button></a><br><br>

JavaScript:
<script>
window.onload = function() {
var urlParams = new URLSearchParams(window.location.search);
var encodedValue = urlParams.get('encoded_value');
document.getElementById('button-1').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/"
document.getElementById('button-2').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/"
document.getElementById('button-3').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/"
}
</script>
  • Please note that if you are using Smart Links, then the following code from above should be changed from this...

document.getElementById('button-1').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/"
  • ...to this (now includes /cmp after the tracking domain

document.getElementById('button-1').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/cmp/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/"

Steps

  • The buttons within the HTML need to have the appropriate IDs or class names. If you use a class name, you will need to associate document.getElementByClassName instead of document.getElementById to them to make them "selectable" within the JavaScript. In the example, see "button-1", "button-2", and "button-3" here.

  • We will be using JavaScript to replace the href="" value with the partner tracking link we create dynamically inside the script section.

  • If desired, you may add sub1 - sub5 parameters using the sample code below with sub parameters defined in the var line items.

JavaScript:

<script> window.onload = function()
{ var urlParams = new URLSearchParams(window.location.search);
var encodedValue = urlParams.get('encoded_value');
var sub1 = urlParams.get('sub1');
var sub2 = urlParams.get('sub2');
var sub3 = urlParams.get('sub3');
var sub4 = urlParams.get('sub4');
var sub5 = urlParams.get('sub5');
document.getElementById('button 1').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/?sub1="+sub1+"&sub2="+sub2+"&sub3="+sub3+"&sub4="+sub4+"&sub5="+sub5
document.getElementById('button-2').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/?sub1="+sub1+"&sub2="+sub2+"&sub3="+sub3+"&sub4="+sub4+"&sub5="+sub5
document.getElementById('button-3').href="https://{INSERT_YOUR_TRACKING_DOMAIN}/"+encodedValue+"/{INSERT_OFFER_ENCODED_VALUE}/?sub1="+sub1+"&sub2="+sub2+"&sub3="+sub3+"&sub4="+sub4+"&sub5="+sub5
}
</script>

  • Set the offer's Base Destination URL of the offer wall / listicle offer with the following parameters and macros appended:

    • ?encoded_value={affiliate_encoded_id} or &encoded_value={affiliate_encoded_id}

  • Please note if you are using Smart Links then the base URL should be modified to this:

    • ?encoded_value={affiliate_smartlink_encoded_id} or &encoded_value={affiliate_smartlink_encoded_id}

  • Grab the Encoded Value for each of the individual offers from the Offers - Manage > Select the Offer > General card > Details and insert it where it says {INSERT_OFFER_ENCODED_VALUE} in the code snippet above.

  • Additionally, you will need to replace {INSERT_YOUR_TRACKING_DOMAIN} with the tracking domain found on the same page in the conversion method section here.

  • To test, generate a tracking link for the offer wall / listicle offer and then click a button on the offer wall / listicle page to make sure it redirects to the correct offer. You will see a click for the offer wall / listicle offer as well as the individual offer.


Using Direct Linking

  • AD (Google/Facebook/Affiliate Link): User clicks (CLICK 1) on AD and lands on your PreLander / Offer Wall.

    https://www.PRELANDER.com?oid=11&affid=2

  • PreLander / OfferWall page: From the Offer Wall, the User clicks (CLICK 2) on a link to reach the final Offer.

  • The Transaction ID must be added to the Offer Page links.


    ?_ef_transaction_id=9f3e7c3bef2d4b6ba0c2bf4bcee45310

  • Code Example

    To be placed on the offer wall / listicle page:

    <script type="text/javascript" src="https://www.TRACKING_DOMAIN.com/scripts/sdk/everflow.js"></script>
    <script type="text/javascript">
    var siteUrl = 'OFFER_PAGE.com';
    var advertiserId = '1';

    window.onload = function() {
    var elems = document.body.getElementsByTagName("a");
    if (!EF.getAdvertiserTransactionId(advertiserId)) {
    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'),
    }).then(function(transaction_id) {
    if (transaction_id != "") {
    for (var i = 0; i < elems.length; i++) {
    if (elems[i].href.includes(siteUrl)) {
    var url = new URL(elems[i].href);
    url.searchParams.set('_ef_transaction_id', transaction_id);
    elems[i].href = url.href
    }
    }
    }
    });
    } else {
    for (var i = 0; i < elems.length; i++) {
    if (elems[i].href.includes(siteUrl)) {
    var url = new URL(elems[i].href);
    url.searchParams.set('_ef_transaction_id', EF.getAdvertiserTransactionId(advertiserId));
    elems[i].href = url.href
    }
    }
    }
    }
    </script>

  • You will need to replace the TRACKING_DOMAIN with the actual tracking domain for the offer. The OFFER_PAGE will need to be replaced with the actual Offer Page URL. And finally replace the advertiserId with the correct value.

  • Advertiser/Offer page:
    User lands on the final Offer page with all the Transaction ID from the initial click.

    https://www.OFFER_PAGE.com?_ef_transaction_id=9f3e7c3bef2d4b6ba0c2bf4bcee45310

  • To use this model with Direct Linking, the standard JavaSscript SDK Click Script must be placed on the Offer Page. You must use the correct TRACKING_DOMAIN here as well.

    <script type="text/javascript" src="https://www.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>
  • When the user lands on the Offer Page, the Transaction ID will be saved in the first party cookie.

  • Conversions will track normally using the standard JavaScript SDK Conversion Script.


Did this answer your question?