Forum Moderators: coopster

Message Too Old, No Replies

Tracking keywords sales conversion past my landing page?

         

andyem

3:05 am on Nov 28, 2006 (gmt 0)

10+ Year Member



Sorry for the noob question but I just cant seem to find the correct code to get this done. I use azoogle and they track subid. The problem I am having is this:

adwords {keyword}->landing page -> {keyword}->azoogle

I am able to collect the keyword on my landing page which is hosted on my server but am not able to repass the keyword in a url format to azoogle. For some reason it doesnt keep the variable stored when im trying to pass it.

I collected the keyword from adwords:

[mydomain.com...]

then gave it to my landing page variable:

$val = $_GET['sub'];
echo "the word is: $val"; <- I use this line just to check the {keyword} was being passed to the landing page variable I assigned, and it does.

Then on all the links on my landing page I used this code:

<a href="http://x.azjmp.com/#*$!X?sub=$val"> <- this is the part that the variable gets lost. Is there code to keep the variables alive long enough so if the user clicks through I can pass along the variable given by adwords/ypn/adcenter?

I reasearhed the php session code but havent been able to get it to work. Any ideas?

eelixduppy

3:36 am on Nov 28, 2006 (gmt 0)



I know this is a stupid question, but are you echoing this line:

echo '<a href="http://x.azjmp.com/#*$!X?sub='.$val.'">somelinke</a>';

hehe :)

there is no reason that I can see why this shouldn't be working correctly

swa66

9:28 am on Nov 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take care:

$val = $_GET['sub']; 
echo '<a href="http://example.com/?sub='.$val.'">somelinke</a>';

Is dangerous: you just have created a website vulnerable to XSS. Make sure to clean out any html in any input before echoing it back.

Just imagine $val containing (with the quotes):

"><script>alert('BOOM')</script><a href="#

Anything javascript can do or get to in the context of your website (e.g. get to authentication, session data, ...) is all of a sudden possibly going to controlled by an attacker of your visitors.

eelixduppy

11:25 am on Nov 28, 2006 (gmt 0)



/\... In which case you can use strip_tags [us3.php.net] :)