Landing Page Click Through Tracking Code

In order to properly track click-throughs on your landing pages, please use this code in your landing page where you want to link your visitor to the offer page. This code is the exact same for every landing page. {{$root._system.product.name}} will handle rotating in the correct offer based on campaign rotations that you set. If you use multiple landing pages, simply use this code to link to the offer on the last landing page before the offer page.

<a href="{{$root._system.settings.installUrl}}/path/out.php?sxid=<?php echo (isset($_GET['sxid'])) ? $_GET['sxid'] : 0 ?>">[Your call-to-action text link or image goes here]</a>
<a href="{{$root._system.settings.installUrl}}/path/out.php">[Your call-to-action text link or image goes here]</a>

If you want JavaScript code to explicitly pass the sub ID, click here.

Landing Page Click Through Code for Email Submits

If you want to track email submits on your landing page, all you have to do is redirect the visitor to the following link immediately after their form is submitted. Redirecting visitors through this link instead of the above would indicate a conversion for “LP Conv” and “LP CVR” metrics, and you would be able to tell how many visitors submitted emails.

<a href="{{$root._system.settings.installUrl}}/path/out.php?{{$root._system.settings.lpConvVariable}}=1&sxid=<?php echo (isset($_GET['sxid'])) ? $_GET['sxid'] : 0 ?>">[Your call-to-action text link or image goes here]</a>

To use the above code, you just have to be sure to keep the “sxid” value in the browser URL all the way through to the page the visitor submits the email form.

<a href="{{$root._system.settings.installUrl}}/path/out.php?{{$root._system.settings.lpConvVariable}}=1">[Your call-to-action text link or image goes here]</a>
Link to & Track Multiple Offers on the Same Landing Page

To create "offer wall" type landing pages and link to and track multiple offers on the same landing page, use the code below. To always link to a specific offer, type "?g=" after "out.php" followed by the offer's ID number. The offer ID numbers can be found on the Offers page next to each offer.

Important: Make sure that the landing page and all the offers you link to in the in landing page are added to rotation for each campaign you want to run this landing page. For various methods on automating tracking of upsells, please review the guides in this support article. If you are unsure of what to do, please submit a support ticket.

<a href="{{$root._system.settings.installUrl}}/path/out.php?sxid=<?php echo (isset($_GET['sxid'])) ? $_GET['sxid'] : 0 ?>&g=1001">[Link for offer 1001 here]</a>
<a href="{{$root._system.settings.installUrl}}/path/out.php?sxid=<?php echo (isset($_GET['sxid'])) ? $_GET['sxid'] : 0 ?>&g=1002">[Link for offer 1002 here]</a>
<a href="{{$root._system.settings.installUrl}}/path/out.php?sxid=<?php echo (isset($_GET['sxid'])) ? $_GET['sxid'] : 0 ?>&g=1044">[Link for offer 1044 here]</a>
...etc
<a href="{{$root._system.settings.installUrl}}/path/out.php?g=1001">[Link for offer 1001 here]</a>
<a href="{{$root._system.settings.installUrl}}/path/out.php?g=1002">[Link for offer 1002 here]</a>
<a href="{{$root._system.settings.installUrl}}/path/out.php?g=1044">[Link for offer 1044 here]</a>
...etc

If you want JavaScript code to explicitly pass the sub ID, click here.

Call Variables Dynamically on Landing Pages

You can use this code to call any dynamic variables you're passing through the landing page URL. We provide 2 code samples, one using PHP and the other using JavaScript.

E.g. if the variable you're passing to the landing page is c1={country}, then to call out the visitor's country in the body of your landing page, use this code. For instance, if c1=Canada, then this code would make "Canada" appear for that visitor.

<?php echo (isset($_GET['c1'])) ? $_GET['c1'] : 'your country'?>
Put this in the <head> tag:
<script type="text/javascript">var c1 = decodeURIComponent(window.location.search.match(/(\?|&)c1\=([^&]*)/)[2]).replace(/(\+|%20)/g, ' ');</script>
Put this in the <body> tag where you want to call the variable:
<script>document.write(c1)</script>
Put this in the <head> tag:
<script type="text/javascript">
function getURLParameter(n) {
    return decodeURI(
        (RegExp(n + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1].replace(/(\+|%20)/g, ' ') || ''
    );
}
alert("YOUR TEXT HERE " + getURLParameter('c1') + " MORE TEXT HERE\n\nTHIS IS A NEW ROW");
</script>
Recommended Code Specifically for Calling Out Device

You can use this code to display the brand and name/model of your visitor's device if you pass those variables to your landing page URL. Here is the general logic included in the code

  • If brand is blank, then "device" will be used instead
  • If name is blank, then whatever is in the model will be used
  • If model is also blank, then nothing will be used for the name or model, a.k.a. the brand will be used only
Two code samples are provided. One for PHP, and the other for JavaScript.

E.g. if the variables passed into the landing page URL are b={brand}, n={name}, and m={model}, then to display it to your page you would use:

<?php
function getDeviceInfoFromQueryString($brand=null, $name=null, $model=null) {
    if($brand === null || !isset($_GET[$brand]) || $_GET[$brand] == '') {
        $out = array('device');
    } else {
        $out = array($_GET[$brand]);
    }
    if($name !== null && isset($_GET[$name]) && $_GET[$name] != '') {
        $out[] = $_GET[$name];
    } elseif($model !== null && isset($_GET[$model]) && $_GET[$model] != '') {
        $out[] = $_GET[$model];
    }
    return implode(' ', $out);
}

// call the getDeviceInfoFromQueryString function with the names of your variables ('b', 'n', 'm') or whatever you had in place of
// b={brand}, n={name}, and m={model}
echo getDeviceInfoFromQueryString('b', 'n', 'm');
?>

If you want JavaScript code to strip the parameters from the URL, click here.