...

View Full Version : php ppc tracking - cant get it to work



marcsam
02-14-2008, 06:04 PM
Hi Guys,

I have been trying to get this to work, and can not see what I am doing incorrect. (ok, I am also not very good at php at all - still learning)

I am trying to pass the keyword through so that it gets auto appended to my outgoing links.
What I have is the following:
My url will say :http://www.mydomain.com/mylandingpage.php?keyword=marc

Then at the end of my outgoing links I have put this: <?php echo $_GET['keyword'] ;?>

As far as I know, this is meant to "pull" the keyword from the url and append it to the outgoing link.

Can you see anything wrong with this at all?

Many thanks for your help.
Marc

aedrin
02-14-2008, 06:07 PM
It helps for us to know what is wrong. Because the technique you use appears to be correct. But since we don't know what is wrong it's hard to say what might be the cause of it 'not working'.

Also, ensure you have error reporting turned on.

marcsam
02-14-2008, 06:10 PM
Hi Aedrin,

woops, sorry.
Basically nothing happens.
When I go to the landing page with the keyword in the url, the outgoing urls do not get appended with anything. When I hover over them they just say: <?php echo $_GET['keyword'] ;?>
and do not have the keyword anywhere?

What do you mean by error reporting?

aedrin
02-14-2008, 06:12 PM
In your PHP's ini file there is a setting called error_reporting which is usually set to not show errors.

If you can see PHP code in 'View Source' (or when hovering over the link) then it sounds though like your PHP file is not getting parsed by PHP. Do you have Apache set up properly with PHP? Can you do the basic phpinfo(); test?

marcsam
02-14-2008, 06:21 PM
I Just did the phpinfo test..and it did not display anything.
I think this is the problem then. The site developer said that the site is php but none of the pages end with .php
They actually do not end in anything, so for example it is just: www.mydomain.com/page

Could this be the reason do you think?
Thanks so much for the swift replies.

aedrin
02-14-2008, 06:42 PM
Not ending in .php does not mean much. They could have mod_rewrite set up. Though any PHP host should interpret *.php files with the PHP interpreter.

Sounds like you need to talk to the host/owner of the site to figure out what the issue is.

marcsam
02-15-2008, 05:22 PM
Hi Aedrin,

Thanks.
It turns out the editor I was using was "changing" the php code somehow.

thanks,
Marc

aedrin
02-18-2008, 09:14 PM
I'd hazard a guess and say it is DreamWeaver, but I shouldn't assume.

That's another reason I prefer HTML editors over WYSIWYG editors.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum