Jump to content


Welcome to the T3Leads Forum.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, create your account today.
To all the members who previously registered on the old T3Leads forum: your registration data were not transferred from the old forum. To get started on the new T3leads.com forum please register again to get access.

Photo

Collecting Visitors' Information

JS формы

  • Please log in to reply
No replies to this topic

#1 admin

admin

    Admin

  • Administrators
  • 38 posts

Posted 03 September 2013 - 03:12 AM

To gather more information about the users, there is a special option "visitor".

In this option sends an object that has three variables: referrer, subaccount, keyword.

Example for Simple JavaScript Form:

var inputOptions = {
    ...
   'Visitor': {
        referrer: (document.cookie.match("rfrrr[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1],  
        subaccount: (document.cookie.match("src[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1],
        keyword: (document.cookie.match("kwrd[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1],
        clickid: (document.cookie.match("clcid[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1]
    }
};

Example for Proxy PHP Form:

<?php
    $a = array(
        ...
       "visitor" => '{
            referrer: (document.cookie.match("rfrrr[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1],  
            subaccount: (document.cookie.match("src[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1],
            keyword: (document.cookie.match("kwrd[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1],
            clickid: (document.cookie.match("clcid[\r\n\t ]*=[\r\n\t ]*(.*?)(;|$)") || [,''])[1]
        }',
    );
?>

The variable referrer is used to store information about that - where a visitor came to your site. 

The variable subaccount To be able to share the traffic from different sources on the subaccount. 

The variable keyword is used to store information about the keyword for which you got to the visitor. Also used for ppc traffic. 

 

To these variables correctly value fell, we recommend that you install on every page of your submitted script found below

<script>
    // Get variable for Subaccount
    var getValueSRC = 'subacc';
  
    // Get variable for Keyword, not used for traffic from search engines. For the traffic from search engines Keyword parsed from the referer
    var getValueKWRD= 'kwrd';

    // Get variable for Click ID
    var getValueCLCID = 'clcid';
    if (document.referrer!=null){
        try{
            if (refDName[1] != curDName[1]) {document.cookie = 'rfrrr='+document.referrer+'; path=/';}
        } catch(err) {}
    }
    try{
        var subacc = (document.location+"&").match(getValueSRC+"=(.*?)[\&]");
        if (subacc[1]) document.cookie = 'src='+subacc[1]+'; path=/';
    } catch(err) {}
    try {
        var kwrd = (document.location+"&").match(getValueKWRD+"=(.*?)[\&]");
        if (kwrd[1]) document.cookie = 'kwrd='+kwrd[1]+'; path=/';
    } catch(err) {}
    try {
        var clcid = (document.location+"&").match(getValueCLCID+"=(.*?)[\&]");
        if (clcid[1]) document.cookie = 'clcid='+clcid[1]+'; path=/';
    } catch(err) {}
</script>






Also tagged with one or more of these keywords: JS формы

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Copyright © 2018 T3 leads