Hey STMers,
I'm running all my LPs on Unbounce.com (easy to create/drag & drop). I've added the redirect code using a Javascript container onto my LPs and it does work/track.
The problem is that when I test the LP URL - this code is automatically redirecting onto the offer without any human intervention! How do I stop this?
I can't use PHP because the LPs are hosted on Unbounce.
Thanks,
Jay.
Just host your LP on your on hosting preferably vps or dedicated
why you use ubounce rather than your own hosting ? i believe if you track using cpvlab or p202 on your own hosting, this will adding more latency in between your host and ubounce, which is not recommended, latency is not your friend in affiliate marketing.
Yeah I agree but I don't have a clue how to build LPs so Unbounce is making it easier for me. The latency isn't bad at all. I'm in the UK and Unbounce servers are in Canada.
are you using the "Landing Page: Outbound PHP Redirect Code"?
What redirect code did you put in the Javascript container?
It would help if you can paste an example of what you did.
Oh I see. are you using the older version of Tracking202?
I'm not familiar with the unbounce interface, but what does your file structure look like? If you put the redirect code in the LP, it seems like it's going to redirect without seeing the LP.
This is what how I imagine you should be setting it up:
Landing Page: landing_page.html
Redirect Page: redirect_offer1.html
landing_page.html contains a link to redirect_offer1.html
the JS redirect should go in redirect_offer1.html
Example:
landing_page.html
<html>
<head></head>
<body>
<h1>
<a href="redirect_offer1.html">Click me to go to the offer</a>
</h1>
<script language="JavaScript" type="text/javascript">
cbr202=Math.random()*10000000000000000;document.wr ite('<scr'+'ipt language="JavaScript" src="http://xxxx.com/tracking202/static/landing.php?lpip=1&202cb='+cbr202+'" type="text/javascript"></scr' + 'ipt>');
</script>
</body>
</html>
<html>
<head></head>
<body>
<script type="text/javascript">
if (readCookie('tracking202outbound') != '') {
window.location = readCookie('tracking202outbound');
} else {
window.location = 'http://xxxx.com/tracking202/redirect/lp.php?lpip=123';
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
</script>
</body>
</html>
Exactly , looks like you are using the wrong JS on the lander. That one should go on the redirect file ( go.php or whatever ).
The code you need to put on the lander should look like this :
<script language="JavaScript" type="text/javascript">
cbr202=Math.random()*10000000000000000;document.wr ite('<scr'+'ipt language="JavaScript" src="http://xxxx.com/tracking202/static/landing.php?lpip=1&202cb='+cbr202+'" type="text/javascript"></scr' + 'ipt>');
</script>
Put it at the end of the file just before the closing </body> tag. In general you don't want javascript in the head tags if you can avoid it as it has to be processed before the page (body) will load. Put javascript in the head tags when your page javascript/content NEEDS the other javascript to function properly. For example if you have page content that requires jquery - you would put jquery in the head tags to guarantee it has loaded and is available before the page content attempts to use it.
Also, depending on the Javascript, it may need the page to be loaded to even work (i.e. if it say manipulates page elements). The p202 code (in landing.php) does a few things, not sure if it needs the body loaded, but it should be able to be processed at any time therefore is best done without impacting page load time that is critical in AM!
Did you put this code anywhere?
<script type="text/javascript">
if (readCookie('tracking202outbound') != '') {
window.location = readCookie('tracking202outbound');
} else {
window.location = 'http://xxxx.com/tracking202/redirect/lp.php?lpip=123';
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
</script>
That's the reason why LP CTR reports no stats. You need to use both codes but they must not be on the same page.
One goes on the landing page and the other goes in your offer redirect page. These are 2 separate pages
I don't understand "offer redirect page"? I only use one LP which redirects to offer. How do I integrate a JS into this flow?
Thanks,
Jay,
What you need to do is create a separate page from your main Unbounce landing page, which JUST contains the code Jasper posted. Then, you link from your Unbounce page to that separate page, which then redirects visitors to your offer.
You have to do this, because otherwise there's no practical way of tracking which visitors click out of your lander to your offer.
When people refer to a "redirect" here, they're not referring to a page which links to another page - they're referring to code which will automatically send a visitor to another page, after doing something - like, in this case, recording their visit.
Ad -> LP -> Redirect page -> Offer
Adding to what caurmen said, you need this code because tracking202 appends the subid to your affiliate links using the javascript code.
Thanks guys. I will test this today and get back to you.
Guys, so I see that P202 generates the following JS redirect code. I understand that I need to add this to a separate page. My question is what code do I add in the yellow highlighted sections (see screenshot)?

Thanks,
Jay.
Just any tracking codes used by other tracking systems you are using. In your case, Unbounce. Unbounce might detect clickthroughs in a number of ways - a javascript even attached to your call-to-action via an "onclick" parameter, or perhaps some javascript code that you drop on the page that the CTA links to. In the latter case, you would put that code here above the yellow lines. If you don't have any code like this that you need to place then the PHP outgoing redirect will be faster and should therefore be used instead.

Thanks to everyone for chipping in. It was a great help.
This is how I implemented Unbounce in the end:
Ad -> LP CTA button -> Redirect page -> Offer