User Tools

Site Tools


te3:incoming:standard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
te3:incoming:standard [2015/11/16 12:21] moderatorte3:incoming:standard [2020/04/15 15:34] (current) – [2. JavaScript tracking] admin
Line 7: Line 7:
 ---- ----
  
-===== Standard incoming tracking =====+===== 1. Standard incoming tracking =====
  
 Standard incoming tracking is simple to setup: Standard incoming tracking is simple to setup:
  
-==== PHP extension ====+==== 1.1. PHP extension ====
  
 Add the tracking code below to all your ''<nowiki>.php</nowiki>'' pages that receive traffic. Add it inside the ''<nowiki><head> </head></nowiki>'' tag. The "include" command will most likely work for everyone.  Add the tracking code below to all your ''<nowiki>.php</nowiki>'' pages that receive traffic. Add it inside the ''<nowiki><head> </head></nowiki>'' tag. The "include" command will most likely work for everyone. 
Line 17: Line 17:
 <code>include("/FULL/PATH/TO/public_html/your_te3_directory/in.php");</code> <code>include("/FULL/PATH/TO/public_html/your_te3_directory/in.php");</code>
  
-++++ Tracking code with your full path already included | We have already prepared the code with your actual full path, public html and directory - navigate to [[te3:admin_panel#Header|Main header]], select "System infofrom the {{:te3:maintenance_logo.png?nolink|}} Maintenance-drop down menu and copy-paste your code.+++++ Tracking code with your full path already included | We have already prepared the code with your actual full path, public html and directory - navigate to [[te3:admin_panel#Header|Main header]], select [[te3:system_info|System info]] from the {{:te3:maintenance_logo.png?nolink|}} Maintenance-drop down menu and copy-paste your code.
 ++++ ++++
  
 ---- ----
  
-==== SSI extension ====+==== 1.2. SSI extension ====
  
 Add the tracking code below to all your ''<nowiki>.shtml</nowiki>'' pages that receive traffic. Add it inside the ''<nowiki><head> </head></nowiki>'' tag. Add the tracking code below to all your ''<nowiki>.shtml</nowiki>'' pages that receive traffic. Add it inside the ''<nowiki><head> </head></nowiki>'' tag.
Line 33: Line 33:
  
 ++++ Tracking code with your directory name already included | ++++ Tracking code with your directory name already included |
-We have already prepared the code with your actual directory name - navigate to [[te3:admin_panel#Header|Main header]], select "System infofrom the {{:te3:maintenance_logo.png?nolink|}} Maintenance-drop down menu and copy-paste your code.+We have already prepared the code with your actual directory name - navigate to [[te3:admin_panel#Header|Main header]], select [[te3:system_info|System info]] from the {{:te3:maintenance_logo.png?nolink|}} Maintenance-drop down menu and copy-paste your code.
 ++++ ++++
  
Line 39: Line 39:
  
  
-===== JavaScript tracking =====+===== 2. JavaScript tracking =====
  
 This method is applicable in two situations:  This method is applicable in two situations: 
  
  
-++++ 1. If you are using caching - Wordpress users (Super Cache, Total Cache), Nginx caching, etc. | +++++ 2.1. If you are using caching - Wordpress users (Super Cache, Total Cache), Nginx caching, etc. | 
  
  
Line 73: Line 73:
    
     docref=encodeURIComponent(docref);     docref=encodeURIComponent(docref);
-    document.write('<div style=\"display: none;\"><img src=\"http://'+domain+'in.php?p=default&ref='+ref+'&rnd='+rnd+'&rImg=1&refremote='+docref+'\" width=\"1\" height=\"1\" border=\"0\"></div>');+    //document.write('<div style=\"display: none;\"><img src=\"http://'+domain+'in.php?p=default&ref='+ref+'&rnd='+rnd+'&rImg=1&refremote='+docref+'\" width=\"1\" height=\"1\" border=\"0\"></div>'); 
 + 
 +    var img = document.createElement('img'); 
 +    img.setAttribute('src', 'http://'+domain+'in.php?p=default&ref='+ref+'&rnd='+rnd+'&rImg=1&refremote='+docref); 
 +    img.setAttribute('width', '1'); 
 +    img.setAttribute('height', '1'); 
 +    img.setAttribute('border', '0'); 
 + 
 +    var elem = document.createElement('div'); 
 +    elem.style.cssText = 'display: none;'; 
 +    elem.appendChild(img); 
 +    document.body.appendChild(elem);
 } }
 +document.addEventListener("DOMContentLoaded", function(event) {
 te3_js_tracking(); te3_js_tracking();
 +});
 +
 // --> // -->
 </script> </script>
 </code> </code>
-  - Adjust "domain" variable in the ''te3_remote_track()'' function. \\ \\+  - Adjust "domain" variable in the ''te3_js_tracking()'' function. \\ \\
   - Test it to see if traffic is being counted correctly. Point your browser to a page where you have placed the tracking code and check TE3 stats to see if it was counted.    - Test it to see if traffic is being counted correctly. Point your browser to a page where you have placed the tracking code and check TE3 stats to see if it was counted. 
 +
 +**Note:** \\ 
 +We have already prepared the code with your actual full path, public html and directory - navigate to [[te3:admin_panel#Header|Main header]], select [[te3:system_info|System info]] from the {{:te3:maintenance_logo.png?nolink|}} Maintenance-drop down menu and copy-paste your JavaScript incoming tracking code.
  
 ++++ ++++
  
  
-++++ 2. It allows you to install TE3 on sub.domain.com (separated server) and trade traffic on domain.com (primary server). |+++++ 2.2. It allows you to install TE3 on sub.domain.com (separated server) and trade traffic on domain.com (primary server). |
  
 If you either can't or don't want to install TE3 on your primary server, remote incoming tracking might be a solution for you. This method allows you to install TE3 on ''sub.domain.com'' (separated server) and trade traffic on ''domain.com'' (primary server). If you either can't or don't want to install TE3 on your primary server, remote incoming tracking might be a solution for you. This method allows you to install TE3 on ''sub.domain.com'' (separated server) and trade traffic on ''domain.com'' (primary server).
Line 118: Line 135:
    
     docref=encodeURIComponent(docref);     docref=encodeURIComponent(docref);
-    document.write('<div style="display: none;"><img src=\"http://'+domain+'/'+path+'/in.php?p=default&rImg=1&preventfrom='+preventfrom+'&ref='+ref+'&rnd='+rnd+'&refremote='+docref+'\" width=\"0\" height=\"0\" border=\"0\"></div>');+//    document.write('<div style="display: none;"><img src=\"http://'+domain+'/'+path+'/in.php?p=default&rImg=1&preventfrom='+preventfrom+'&ref='+ref+'&rnd='+rnd+'&refremote='+docref+'\" width=\"0\" height=\"0\" border=\"0\"></div>'); 
 + 
 +    var img = document.createElement('img'); 
 +    img.setAttribute('src', 'http://'+domain+'in.php?p=default&ref='+ref+'&rnd='+rnd+'&rImg=1&preventfrom='+preventfrom+'&refremote='+docref); 
 +    img.setAttribute('width', '1'); 
 +    img.setAttribute('height', '1'); 
 +    img.setAttribute('border', '0'); 
 + 
 +    var elem = document.createElement('div'); 
 +    elem.style.cssText = 'display: none;'; 
 +    elem.appendChild(img); 
 +    document.body.appendChild(elem);
 } }
 +document.addEventListener("DOMContentLoaded", function(event) {
 te3_remote_track(); te3_remote_track();
 +});
 // --> // -->
 </script> </script>
Line 133: Line 163:
 </WRAP> </WRAP>
  
 + 
te3/incoming/standard.1447676514.txt.gz · Last modified: 2015/11/16 12:21 by moderator

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki