instead of
www.awin.com/etcetc&clickref=<?php echo $_SESSION['kw'];?>
shouldn't it be?
www.awin.com/etcetc&clickref=<?php echo $_SESSION['track'];?>
Hi all
I could really do with some help on the subject of PPC tracking - mainly with regards to PHP?
I have posted a couple of times and almost got close to cracking it but the clickref reports in AWIN are empty! :-(
I am going to outline below the tracking I have in my PPC redirect, the PHP in my landing page and my current affiliate link on site - I am really, really hopeful someone can help!
My PPC redirect is:
www.mysite.com/specifiedlandingpage/?kw=goog1 (I am using specific numbers to reference to keywords and their match types in an excel sheet I have saved somewhere)
My PHP on landing page is:
<?php
session_start();
$_SESSION['track'] = $_GET['kw'];
?>
Finally, the clickref function I am using in the affiliate link is:
www.awin.com/etcetc&clickref=<?php echo $_SESSION['kw'];?>
Can anyone advise where I have gone wrong? It may be something very simple but really need some help here!
Thanks in advance....![]()
instead of
www.awin.com/etcetc&clickref=<?php echo $_SESSION['kw'];?>
shouldn't it be?
www.awin.com/etcetc&clickref=<?php echo $_SESSION['track'];?>
Still returning results as empty?
Does all the code look correct now?
Is it just a fundamental problem with the PHP on my wordpress page?
If you're just testing it yourself in a single browser you may need to destroy the current session as it may not contain any data.
PHP Tutorial - Session
Code:<?php session_start(); session_destroy(); ?>
David Macfarlane
Cost effective web development. Codewise
is the affiliate link on a different page to your landing page? www.mysite.com/specifiedlandingpage/?kw=goog1
if it is, then I think you also need to include this line:
session_start();
before any html on the page where the affiliate link is situated
Hi guys - thanks for taking the time to help me...
Unfortunately, my clickref report is still blank - there is just a problem with the pulling through of the referring keyword.
The click is being recorded so the actual affiliate link I believe is fine but I believe the actual PHP code I have is wrong. It is in my header template on my wordpress site - would this affect the functionality of it?
Would you be able to ouline the code you use in your landing page and affiliate link?
I would be eternally grateful!
when you hover on your affiliate link, can you see the clickref in the status bar?
David Macfarlane
Cost effective web development. Codewise
Sure can...is that a bad thing?
I know I can cloak it etc but for the time being, would just like the damn thing working!
it should be working then...
Best to send a support request to affiliate window.
David Macfarlane
Cost effective web development. Codewise
I don't use wordpress so I don't know where the header template sits in the order of things, but if the session_start(); function is not the very first thing before any other code then the whole session will simply not work, so I suspect this may be the problem.
see this page PHP Sessions
As you can't get the session thing to work, have you thought about storing the keyword in a cookie instead?
so on your landing page you would use someting like:
(the time()+3600 above is the number of seconds the cookie is valid, change it to whatever suits you)PHP Code:$kw = @$_GET['kw'];
setcookie ("keyword", "$kw", time()+3600, "/");
then you extract the keyword from the cookie and insert into your affiliate link:
PHP Code:www.awin.com/etcetc&clickref=<?php echo $_COOKIE['kw'];?>
Thanks Tx4i - so should I copy and paste that PHP code in its entirety?
Do I need to put the below around it?
<?php
?>
Appreciate your help on this mate.
![]()
Firstly, thanks for taking the time to assist me with this...
However, reports are still empty and I think I know why.
I have been reading up on another forum and as I am using a Wordpress site, I have been adding into a template (the header template) and as such it has been applied across all pages.
Apparantly this is bad...?
Is this why it is not working?
Is there a way round it because if I can not track PPC on Wordpress sites - I am pretty much screwed!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks