Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/html/check_language.php on line 6

Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/html/check_language.php on line 6

Binom Documentation

Go to navigation

Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/html/check_language.php on line 6

JS Protection

Some site constructors don’t let users include .php scripts into landing page code, which makes it impossible to use the Click API script. This is when JS Protection can be of help.

This script will help you send traffic to a landing page and change its content depending on whether or not Binom detected it as bot traffic.

How it works


Let’s say that there’s traffic coming to Landing Page A that contains the JS Protection script. The script collects information about traffic and sends it to Binom (like LP Pixel). Binom registers that info as a new click and depending on the Bot/NOT bot rule sends one of the following commands to Landing Page A:

— load Landing Page B without redirect (if an integrated landing page is specified in the campaign settings)
— redirect to Landing Page B (if a non-integrated landing page is specified in the campaign settings)
— do nothing (if + Direct is specified in the campaign settings)

So it is possible to show Landing Page A to bots and moderators and Landing Page B to your target traffic.

The Bot rule gets its response from the Binom Protection (beta) or Adspect in the campaign settings.

Script


  • JS Protection script
    •                     
                            <script>
                              !function(){if(-1==window.location.href.search("[?&]nr=1")){var e=new XMLHttpRequest;e.open("GET","http://YOURDOMAIN/click.php?key=CAMPKEY&lp_type=js_redirect",!0),e.onload=function(){if(200===e.status){var t=JSON.parse(e.responseText);return t.landing_html?(document.open(),document.write(t.landing_html),void document.close()):t.landing_url?(document.open(),document.write("<html><head>"),document.write('<meta name="referrer" content="never" />'),document.write('<meta http-equiv="refresh" content="0; url='+t.landing_url+'" />'),document.write("</head></html>"),void document.close()):void 0}},e.send()}}();
                            </script>
                          
                        

Insert the script into head of your landing page. Instead of YOURDOMAIN specify a domain, and instead of CAMPKEY specify your campaign key.

The script is unique for each campaign, open the campaign settings and find it in the JS Protection field.

Setting up a campaign


If you want to show one landing page to the bots and moderators, and another version of it to your target traffic, try using the following settings:

This way your target traffic will be sent through the NOT bot rule. Content on Landing Page A will be changed to content on Landing Page B (if Landing Page B is integrated) or that traffic will be redirected from Landing Page A to Landing Page B (if Landing Page B is not integrated).

The rest of traffic will be sent through a default path with + Direct specified, so no changes will be applied. To save a campaign and not ruin the statistics, specify an offer or Direct URL. Instead of + Direct you can specify any other landing page. In this case content of Landing Page A will change for the moderators as well:

Keep in mind that it's just an example. Your distribution flow will most likely be different and depend on your needs and the amount of paths and landing pages.

Hiding JS Protection


To encrypt the JS Protection script, select an option from the dropdown menu:

Default

Without encryption.

Base64 Encoded

Base64 encoding scheme.

Obfuscated

Obfuscation method. Each Copy click will make Binom save JS Protection code to the clipboard and add a random meta content value, making the code of the script look different.