Help With A Script - Alternative To Google Conv. Tracking

Status
Not open for further replies.

Rudolf

New member
May 20, 2007
2
0
0
Hi there!

We're running a review site with lots of pages, and our Adwords campaign exists of dozens of groups (in order to accurately target each keyword).

We have asked our affiliate manager to insert our Adwords conversion tracking code into the "Thank you" page but he refused. This affiliate is very profitably so we don't want to quit the program.

Unfortunately they are not in the clickbank directory so that's not an option. I was thinking of using the same principle used to cover affiliate links. Instead of:

www.hop.clickbank.com it would display: www.mysite.com/product/.

In the /product/ folder there is an index.php file with the following code:

Code:
<?PHP

Header("Location: http://www.productsite.com/affiliate-id");
Exit;

?>

That works perfectly. However, what if this script can also be used to open another url first? In this case the url of a page located on my own site, that contains the Adwords code in the .html coding. For instance;

Code:
<?PHP

Header("Location: http://www.mysite.com/tracking.html");
Header("Location: http://www.productsite.com/affiliate-id");
Exit;

?>

Would this work? Or does anyone know how to do this, or have a suggestion using a similar way?

I would really appreciate any help here. Currently we're still shooting in the dark and we're stuck with having to test each group seperately which is highly timeconsuming.

Thanks in advance for your time.

Regards, Maarten & Rudolf
 


Here's a few ideas.

If you want can, push them to a page (yours) which has your code in it. Then IFRAME (size 100%x100%) the other page you want to load (the second one). This should get your problem out of the way.

If you have editing option on the second page, put an invisible iframe with the tracking code in it on there.

Just a few ideas, good luck.
 
What about this:

Code:
<?php

include "http://www.mysite.com/tracking.html";
header("Location: http://www.productsite.com/affiliate-id");
exit;

?>

I haven't tested it, but it should work. You can send all the tracking info you want in the first url via GET.

Oh, and the tracking page can't generate any output, or it will give you a "headers already sent"-error... I think...
 
nis is correct - you can't use a header redirect twice.

I think you're on right track, although here is what I would do differently. Depending on how many products you have, it may not be wise to create hundreds of subfolders with their own index.php page. Why don't you do something like this:

1. Create a link on your product page with a querystring that identifies the product. For example, maybe "Nike Shoes ABC123" would redirect to yoursite.com/products.php&productID=XYZ.

2. In products.php, programtically track what product was being requested ($_GET) and then write this information to a database, or whatever you want to do with it.

3. Finally do a redirect to the affiliate page.

Does this make sense? It kind of depends on what your tracking.html page is doing...
 
Thanks for the replies!

The tracking.html file is just a blank .html page, with the Google Adwords tracking code in the source of the page. I just want it to open the tracking.html file, so that it can send information to Adwords, and then redirect to the product page (I'm an affiliate so I'm not responsible for the sales pitch, that's their job).

Currently we're reviewing only 5 products max. per website. We only have one website, so fortunately there won't be much grunt work involved.

Nis, the code you suggested gives me an error. It gets stuck on the tracking.html page saying that I can't redirect twice? My coding skills are very poor. Do I still need to add this "get" code somewhere?

Thanks again. It's been of great help.

Regards, Rudolf
 
Ah. My code wouldn't work the way you intend it to.

I thought you had your own script to track stats. If you want to use GA. your only option might be with that iframe suggested by Bofu2U. But I don't know if GA works in iframes. It might, it might not. I haven't tried it.
 
Someone has just pointed out in another thread this Adwords policy:

- Your website may not simply use frames to display content from another site, nor may your website mirror another site.

Worth bearing in mind if you are thinking of using iframes.
 
LazyHippy I think you misunderstood, he just wants an iframe to have his google adwords code executed, it will not be on the offer page.. which kinda ruins the purpose..

That is not yet a conversion, all you managed to do is get a click from your landing page to theirs.

So instead I would just save that in a database or whatever. If you still want to do it have it in the page redirect.html and set a meta-redirect of 1 second or what not.
 
I've never used google tracking before, but it should be in jscript, so my
suggestion would be to do it in a single page. i.e

1.) Load google tracking code
then redirect to you affiliate program.
For this purpose it would be better if you used
a timed jscript before redirecting instead of server-side code.

eg:
"Please wait..Transfering you to xxyayayw
If your browser does not redirect, click here to continue"
 
Just off the top of my head, you can add this after you google tracking code.

<script>
myURL = "http://wickedfire.com"; // Your Aff url
delayMS = 5000; //Time dely in ms
mytime=setTimeout('window.location = myURL',delayMS);
</script>
 
Status
Not open for further replies.