Binom Documentation

К навигации

LP Pixel

It might happen that you need to run traffic on landing not counting the tracker. Thereby you can send all the tokens of the source in the URL’s parameters. Example:site.com?domain={$domain}&pubid={$id}&os={$os}, just copy these parameters from Campaign URL of your campaign. Now you can test offers in the tracker, set weights and use smart rotation. Here work all the rules connected to the offers, and so you can send click to offer, URL or campaign further, on the basis of the token’s value.

Wherefore to use it?

- In case the source does not support links with redirect (Adwords, FB, MyTarget)
- When you need the possibility to use CDN for the landings
- If you send traffic to your site and want to measure the conversion from it to different offers, among others by different measures and ranges.

How to use?

Move to the campaign settings and take the code from LP Pixel field of the additional settings:

Paste it into the html-code of your landing inside the HEAD. Note, that this code is particular for each campaign. After that you can send your traffic to the landing directly. Add your landing to the campaign settings, but that’s not essential. This mode makes the split-test of the landings not available. All the clicks are to be displayed in the tracker’s report so as they would be sent through the Campaign URL, you get available all the measures and grouping reports.

  • Passing LP-tokens in tracker
    • In order to pass LP tokens from landing with LP Pixel, you need to use the following code:

                                                  
                                                      <script type="text/javascript">
      tracker_url='http://domain/';
      function lp_update_token(token,value){
      var o = document.createElement("img");
      if (typeof window['getUclick'] == 'function'){
      o.src=tracker_url+'click.php?lp=data_upd&'+token+'='+value+'&uclick='+getUclick();
      }else{
      o.src=tracker_url+'click.php?lp=data_upd&'+token+'='+value;
      }
      }
      lp_update_token('test99','test');
      </script>
      where instead of domain you need to specify your campaign's domain.

  • Passing events in tracker
    • In order to pass events from landing with LP Pixel, you need to use the following code:

                                                  
                                                      <script>
                                                      tracker_url='http://domain/';
                                                      var o = document.createElement("img");
                                                      if (typeof window['getUclick'] == 'function'){
                                                          o.src=tracker_url+'click.php?event7=1&uclick='+getUclick();
                                                      }else{
                                                          o.src=tracker_url+'click.php?event7=1';
                                                      }
                                                      </script>
                                                  
                                              
      where instead of domain you need to specify your campaign's domain.

  • Passing conversions in tracker
    • In order to pass conversions from landing with LP Pixel, you need to use the following code:

                                                  
                                                      <script type='text/javascript'>
      tracker_url='http://domain/';
      function cnv_pixel(){
      var o = document.createElement("img");
      if (typeof window['getUclick'] == 'function'){
      o.src=tracker_url+'index.php?cnv_id=OPTIONAL&payout=OPTIONAL&uclick='+getUclick();
      }else{
      o.src=tracker_url+'index.php?cnv_id=OPTIONAL&payout=OPTIONAL';
      }
      }
      cnv_pixel() <!-- Can use in any place of landing's code -->
      </script>
      where instead of domain you need to specify your campaign's domain.

  • Passing tokens from tracker to landing
    • In order to pass any parameter from tracker to landing with LP Pixel, you need in campaign settings (landing's url) specify requested token (for example, device_name):

      For output in landing's code you need to use the following code:

                                                  
                                                      <script type='text/javascript'>
      document.write('device_name: '+tokens.device_name);
      </script>
      where instead of device_name you need to specify token.

Landings split-test

Split-test in this mode is complicated by the fact, that the traffic is sent to the same URL, but you can use the script in the code of the lending to show its variations, or completely different landings. The script should be that kind (example for two landings):

                            
                                <?php
if (rand(0,1)==1) { ?>
// HTML code of lander 1
<?php }
else
{ ?>
// HTML code of lander 2
<?php } ?>

In order to send information about what kind of lending was shown to the user, use the &to_lander parameter in LP Pixel. Use it by the following algorithm:
1) Add the required number of landings to the campaign. For example, if in a script you do a split test of two landings, then add two landings in the campaign settings, otherwise the to_lander will not work.
2) In the campaign URL within the LP Pixel set the parameter &to_lander=N. for variations of the landings. For example, you have the following LP Pixel code:

  • Original LP Pixel code
    •                                             
                                                      <script type='text/javascript' src="http://domain/click.php?key=key&lp_type=pixel"></script>
      <script type='text/javascript'>function getUclick(){var m = document.cookie.match(new RegExp('(?:^|; )' + 'uclick'.replace(/([.$?*|{}()[]\/+^])/g, '\$1') + '=([^;]*)'));var u = m ? decodeURIComponent(m[1]) : undefined;return u;}function fxOfLnks(){var u=getUclick();if (typeof u == 'undefined') return false;var l = document.getElementsByTagName('a');for (var i=0;i<l.length;i++){var href = l[i].getAttribute('href');if (href.indexOf('&event')!=-1 ||href.indexOf('?event')!=-1 || href.indexOf('?lp=1')!=-1 || href.indexOf('?lp=data_upd')!=-1 || href.indexOf('?cnv_id=OPTIONAL')!=-1){l[i].href = href+'&uclick='+u;}}};document.addEventListener("DOMContentLoaded", fxOfLnks);</script>


Add the &to_lander=1 parameter for the first variation of the lending:

  • First landing code
    •                                             
                                                      <script type='text/javascript' src="http://domain/click.php?key=key&to_lander=1&lp_type=pixel"></script>
      <script type='text/javascript'>function getUclick(){var m = document.cookie.match(new RegExp('(?:^|; )' + 'uclick'.replace(/([.$?*|{}()[]\/+^])/g, '\$1') + '=([^;]*)'));var u = m ? decodeURIComponent(m[1]) : undefined;return u;}function fxOfLnks(){var u=getUclick();if (typeof u == 'undefined') return false;var l = document.getElementsByTagName('a');for (var i=0;i<l.length;i++){var href = l[i].getAttribute('href');if (href.indexOf('&event')!=-1 ||href.indexOf('?event')!=-1 || href.indexOf('?lp=1')!=-1 || href.indexOf('?lp=data_upd')!=-1 || href.indexOf('?cnv_id=OPTIONAL')!=-1){l[i].href = href+'&uclick='+u;}}};document.addEventListener("DOMContentLoaded", fxOfLnks);</script>


And the parameter &to_lander=2 for the second variation of the lending:

  • Second landing code
    •                                             
                                                      <script type='text/javascript' src="http://domain/click.php?key=key&to_lander=2&lp_type=pixel"></script>
      <script type='text/javascript'>function getUclick(){var m = document.cookie.match(new RegExp('(?:^|; )' + 'uclick'.replace(/([.$?*|{}()[]\/+^])/g, '\$1') + '=([^;]*)'));var u = m ? decodeURIComponent(m[1]) : undefined;return u;}function fxOfLnks(){var u=getUclick();if (typeof u == 'undefined') return false;var l = document.getElementsByTagName('a');for (var i=0;i<l.length;i++){var href = l[i].getAttribute('href');if (href.indexOf('&event')!=-1 ||href.indexOf('?event')!=-1 || href.indexOf('?lp=1')!=-1 || href.indexOf('?lp=data_upd')!=-1 || href.indexOf('?cnv_id=OPTIONAL')!=-1){l[i].href = href+'&uclick='+u;}}};document.addEventListener("DOMContentLoaded", fxOfLnks);</script>


The final script will look like this:

  • Landing's code
    •                                             
                                                      <?php
      if (rand(0,1)==1) { ?>
      // HTML code of lander 1
      <script type='text/javascript' src="http://domain/click.php?key=key&to_lander=1&lp_type=pixel"></script>
      <script type='text/javascript'>function getUclick(){var m = document.cookie.match(new RegExp('(?:^|; )' + 'uclick'.replace(/([.$?*|{}()[]\/+^])/g, '\$1') + '=([^;]*)'));var u = m ? decodeURIComponent(m[1]) : undefined;return u;}function fxOfLnks(){var u=getUclick();if (typeof u == 'undefined') return false;var l = document.getElementsByTagName('a');for (var i=0;i<l.length;i++){var href = l[i].getAttribute('href');if (href.indexOf('&event')!=-1 ||href.indexOf('?event')!=-1 || href.indexOf('?lp=1')!=-1 || href.indexOf('?lp=data_upd')!=-1 || href.indexOf('?cnv_id=OPTIONAL')!=-1){l[i].href = href+'&uclick='+u;}}};document.addEventListener("DOMContentLoaded", fxOfLnks);</script>
      <?php }
      else
      { ?>
      // HTML code of lander 2
      <script type='text/javascript' src="http://domain/click.php?key=key&to_lander=2&lp_type=pixel"></script>
      <script type='text/javascript'>function getUclick(){var m = document.cookie.match(new RegExp('(?:^|; )' + 'uclick'.replace(/([.$?*|{}()[]\/+^])/g, '\$1') + '=([^;]*)'));var u = m ? decodeURIComponent(m[1]) : undefined;return u;}function fxOfLnks(){var u=getUclick();if (typeof u == 'undefined') return false;var l = document.getElementsByTagName('a');for (var i=0;i<l.length;i++){var href = l[i].getAttribute('href');if (href.indexOf('&event')!=-1 ||href.indexOf('?event')!=-1 || href.indexOf('?lp=1')!=-1 || href.indexOf('?lp=data_upd')!=-1 || href.indexOf('?cnv_id=OPTIONAL')!=-1){l[i].href = href+'&uclick='+u;}}};document.addEventListener("DOMContentLoaded", fxOfLnks);</script>
      <?php } ?>

How can I protect myself from moderators if I set traffic directly on the landing?

To do this, use our cloaking script on landing site. Read more in this article.

One LP Pixel for multiple campaigns

If you need to use same landing in different campaigns, the LP Pixel code should be replaced with the following:

                            
                                <script type='text/javascript'>
function getURLParameter(name) { return decodeURI( (RegExp(name + '=' + '(.*?)(&|$)').exec(location.search)||[,null])[1] || '' ) } var nameOfGetParamWithCampaignKey = 'key'; var campkey = getURLParameter( nameOfGetParamWithCampaignKey ); var binom_domain = 'http://tracker.com/'; var script = document.createElement('script'); script.src = binom_domain+'click.php?key='+campkey+'&lp_type=pixel&'+window.location.search.substring(1); document.head.appendChild(script); function getUclick() { var m = document.cookie.match(new RegExp('(?:^|; )' + 'uclick' + '=([^;]*)')); var u = m ? decodeURIComponent(m[1]) : undefined; return u; } function fxOfLnks() { var u=getUclick();if (typeof u == 'undefined') return false; var l = document.getElementsByTagName('a'); for (var i=0;i<l.length;i++){var href = l[i].getAttribute('href'); if (href.indexOf('&event')!=-1 || href.indexOf('?event')!=-1 || href.indexOf('?lp=1')!=-1 || href.indexOf('?lp=data_upd')!=-1 || href.indexOf('?cnv_id=OPTIONAL')!=-1){ l[i].href = href+'&uclick='+u; } } } document.addEventListener("DOMContentLoaded", fxOfLnks) </script>
where instead of http://tracker.com/ you need to specify your link to the tracker.

Now, to account for traffic on desired campaign, you need to send it by different links:
http://landing-page.com/index.html?key=one - for the first campaign,
http://landing-page.com/index.html?key=two - for the second campaign,
where http://landing-page.com/index.html - is a direct link to the landing, and one and two - are the keys to the first and second campaigns, respectively.