====== Incoming tracking ====== ~~NOTOC~~ 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: ==== 1.1. PHP extension ==== Add the tracking code below to all your ''.php'' pages that receive traffic. Add it inside the '' '' tag. The "include" command will most likely work for everyone. include("/FULL/PATH/TO/public_html/your_te3_directory/in.php"); ++++ 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. ++++ ---- ==== 1.2. SSI extension ==== Add the tracking code below to all your ''.shtml'' pages that receive traffic. Add it inside the '' '' tag. /* * */ ++++ 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 [[te3:system_info|System info]] from the {{:te3:maintenance_logo.png?nolink|}} Maintenance-drop down menu and copy-paste your code. ++++ ---- ===== 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 ''header.php'' file (usually found in ''wp-content/themes/THEMENAME/header.php'' location). \\ \\ - To set up incoming tracking place the following code after the tag and rename ''domain.com'' to your actual domain name: \\ \\ - 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. **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.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). **Configuration:** - Install TE3 on ''sub.domain.com'' on your secondary server. \\ \\ - Add remote tracking code (copy paste from the frame below) to all your pages on ''domain.com'' that receive traffic. \\ \\ - Adjust "domain", "path" and "preventfrom" variables in the ''te3_remote_track()'' function. \\ \\ - 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. ++++ Javascript tracking method is less accurate than standard incoming tracking, therefore it should only be considered, if there is absolutely no other option.