Page 1 of 1
Trade Expert and W3 total cache plugin [Wordpress]
Posted: Thu Mar 27, 2014 2:27 pm
by koguy
Hi
I have problem becouse when I active page cache on my site(W3 total cache option)
My Script does not count mu incoming traffic
How I can fix it?
Re: Trade Expert and W3 total cache plugin [Wordpress]
Posted: Sun Mar 30, 2014 7:59 am
by texpert
Hello, just put the code in header.php after <body> tag and rename yourdomain.com to your domain name, and clear the cache after you save it and it should work, and don't forget to remove the old te3 incoming code if you have added it already.
<script type="text/javascript">
<!--
function getquery(n) {
var half = location.search.split(n+'=')[1];
return half ? decodeURIComponent(half.split('&')[0]):null;
}
function te3_remote_track() {
var remotedomain = 'yourdomain.com/te3/'; // remote tracking domain with TE3 dir, e.g. sub.domain.com/te3/
var preventfrom = 'yourdomain.com'; // prevent double tracking from your own domain, e.g. domain.com
var docref = parent.document.referrer;
var ref= getquery('ref');
var rnd = Math.floor(Math.random() * 99999999);
if(!docref) docref='';
if(!ref) ref='';
docref=encodeURIComponent(docref);
document.write('<div style=\"display: none;\"><img src=\"http://'+remotedomain+'in.php?p=default&preventfrom='+preventfrom+'&ref='+ref+'&rnd='+rnd+'&refremote='+docref+'\" width=\"1\" height=\"1\" border=\"0\"></div>');
}
te3_remote_track();
// -->
</script>
best regards,
Alex