Binom Documentation

Go to navigation

Updating tokens from a landing page

Binom receives most of the information about clicks when they go through the tracker. Binom can read country, city, ISP, device, and so on. But some info can’t be obtained this way. For example, installed browser plugins, orientation, whether or not browser history is saved. Besides, Binom doesn’t save all the info that someone might need.

How to use


To use this feature, add the following code inside <head></head>:

                      
                        <script type="text/javascript">
                          tracker_url='http://YOUR_TRACKER_URL/';
                          function lp_update_token(token,value)
{ var o = document.createElement("img"); o.src=tracker_url+'click.php?lp=data_upd&'+token+'='+value; } </script>

Binom does not update existing traffic source tokens, so use other names. For example, you want to display information about an object orientation (it’s undefined for all desktop devices). In this case, feel free to name the token “orientation”. LP T: orientation will be added to the list of tokens in the campaign report.

To transfer data to this token, use lp_update_token as follows:
lp_update_token('orientation','yes');

You can use multiple tokens for one click (but not more than 10 tokens), just call this function as many times as you need. For example, you also need information on the user agent:
lp_update_token('test',navigator.userAgent);

Note: to update tokens on a landing page with LP Pixel, you must add a delay in the script executing:

                    
                      <script>
                        setTimeout( function(){
                        lp_update_token('orientation','yes');
                        }, 300);
                      </script>
                    
                  

Examples


Orientation

                    
                      <head>
                      ...
                        <script type="text/javascript">
                          tracker_url='http://YOUR_TRACKER_URL/';
                          function lp_update_token(token,value)
                          {
                            var o = document.createElement("img");
                            o.src=tracker_url+'click.php?lp=data_upd&'+token+'='+value;
                          }
                        </script>
                      </head>
                      <body>
                      ...
                        <script type="text/javascript">
                          if (typeof(window.orientation)!="undefined") 
                          { lp_update_token("bot","no"); }
                          else
                          { lp_update_token("bot","yes"); }
                        </script>
                      ...
                      </body>
                    
                  

TRANSFERRING PARAMETERS FROM THE $ _SERVER VARIABLE

                      
                        <head>
                        ...
                          <script type="text/javascript">
                            tracker_url='TRACKER URL';
                            function lp_update_token(token,value)
                            {
                              var o = document.createElement("img");
                              o.src=tracker_url+'click.php?lp=data_upd&'+token+'='+value;
                            }
                          </script>
                        </head>
                        <body>
                        ...
                          <script type="text/javascript">
                            lp_update_token('header_lang','<?php echo $_SERVER['HTTP_ACCEPT_LANGUAGE']; ?>');
                          </script>
                        ...
                        </body>
                      
                    

Don’t forget that the landing page must have the .php extension in this case.