te3:incoming:standard
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
te3:incoming:standard [2014/11/26 06:28] – created moderator | te3:incoming:standard [2020/04/15 15:34] (current) – [2. JavaScript tracking] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Incoming tracking ====== | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | ====== Standard incoming tracking | + | |
+ | |||
+ | To configure “incoming traffic” tracking on your site, you'll have to add a special tracking code on all pages that receive traffic (index page and all sub pages). If you are switching from a different script and have a running site, you can safely add TE3 tracking code in addition to the existing code - both scripts will track incoming traffic simultaneously. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== 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 ''< | Add the tracking code below to all your ''< | ||
Line 10: | Line 17: | ||
< | < | ||
- | ++++ 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: | + | ++++ 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: |
++++ | ++++ | ||
---- | ---- | ||
- | ===== SSI extension | + | ==== 1.2. SSI extension ==== |
Add the tracking code below to all your ''< | Add the tracking code below to all your ''< | ||
Line 26: | 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: | + | We have already prepared the code with your actual directory name - navigate to [[te3: |
++++ | ++++ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ===== 2. JavaScript tracking ===== | ||
+ | |||
+ | This method is applicable in two situations: | ||
+ | |||
+ | |||
+ | ++++ 2.1. If you are using caching - Wordpress users (Super Cache, Total Cache), Nginx caching, etc. | | ||
+ | |||
+ | |||
+ | |||
+ | **Configuration for Wordpress users:** | ||
+ | |||
+ | |||
+ | - Install TE3 and Wordpress. \\ \\ | ||
+ | - Open your current theme '' | ||
+ | - To set up incoming tracking place the following code after the < | ||
+ | <script type=" | ||
+ | <!-- | ||
+ | function getquery(n) { | ||
+ | var half = location.search.split(n+' | ||
+ | return half ? decodeURIComponent(half.split('&' | ||
+ | } | ||
+ | |||
+ | function te3_js_tracking() { | ||
+ | // parameters to be changed | ||
+ | var domain = ' | ||
+ | |||
+ | var docref = parent.document.referrer; | ||
+ | var ref= getquery(' | ||
+ | var rnd = Math.floor(Math.random() * 99999999); | ||
+ | |||
+ | if(!docref) docref=' | ||
+ | if(!ref) ref=''; | ||
+ | |||
+ | docref=encodeURIComponent(docref); | ||
+ | // | ||
+ | |||
+ | var img = document.createElement(' | ||
+ | img.setAttribute(' | ||
+ | img.setAttribute(' | ||
+ | img.setAttribute(' | ||
+ | img.setAttribute(' | ||
+ | |||
+ | var elem = document.createElement(' | ||
+ | elem.style.cssText = ' | ||
+ | elem.appendChild(img); | ||
+ | document.body.appendChild(elem); | ||
+ | } | ||
+ | document.addEventListener(" | ||
+ | te3_js_tracking(); | ||
+ | }); | ||
+ | |||
+ | // --> | ||
+ | </ | ||
+ | </ | ||
+ | - Adjust " | ||
+ | - 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: | ||
+ | |||
+ | ++++ | ||
+ | |||
+ | |||
+ | ++++ 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 '' | ||
+ | |||
+ | |||
+ | |||
+ | **Configuration: | ||
+ | |||
+ | |||
+ | - Install TE3 on '' | ||
+ | - Add remote tracking code (copy paste from the frame below) to all your pages on '' | ||
+ | <script type=" | ||
+ | <!-- | ||
+ | function getquery(n) { | ||
+ | var half = location.search.split(n+' | ||
+ | return half ? decodeURIComponent(half.split('&' | ||
+ | } | ||
+ | |||
+ | function te3_remote_track() { | ||
+ | // parameters to be changed | ||
+ | var domain = ' | ||
+ | path = ' | ||
+ | preventfrom = ' | ||
+ | |||
+ | |||
+ | var docref = parent.document.referrer, | ||
+ | ref= getquery(' | ||
+ | rnd = Math.floor(Math.random() * 99999999); | ||
+ | |||
+ | if(!docref) docref=' | ||
+ | if(!ref) ref=''; | ||
+ | |||
+ | docref=encodeURIComponent(docref); | ||
+ | // document.write('< | ||
+ | |||
+ | var img = document.createElement(' | ||
+ | img.setAttribute(' | ||
+ | img.setAttribute(' | ||
+ | img.setAttribute(' | ||
+ | img.setAttribute(' | ||
+ | |||
+ | var elem = document.createElement(' | ||
+ | elem.style.cssText = ' | ||
+ | elem.appendChild(img); | ||
+ | document.body.appendChild(elem); | ||
+ | } | ||
+ | document.addEventListener(" | ||
+ | te3_remote_track(); | ||
+ | }); | ||
+ | // --> | ||
+ | </ | ||
+ | </ | ||
+ | - Adjust " | ||
+ | - Test it to see if traffic is being counted correctly. Point your browser to a page where you have placed remote tracking code and check TE3 stats to see if it was counted. | ||
+ | |||
+ | ++++ | ||
+ | |||
+ | <WRAP caution> | ||
+ | Javascript tracking method is less accurate than standard incoming tracking, therefore it should only be considered, if there is absolutely no other option. | ||
+ | </ | ||
+ | |||
+ |
te3/incoming/standard.1416983304.txt.gz · Last modified: 2014/11/26 06:28 by moderator