The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Saving and passing variables in a URL string Re: Saving and passing variables in a URL string


I’m basically wanting to track paid search (PPC advertising) keywords from Adwords –> My Site –> Another site where my visitors will go to purchase a product.

I can identify the incoming clicks with a unique tracking ID in the URL, such as:

Where the tid portion of the URL would be a unique number related to the keyword that triggered my Ad to display.

Once the visitor arrives on my site, my ultimate goal is to have him/her click a link to another site where they can buy a product and earn me a commission. When they click that link I want to pass the tid=xxxx string along to the external site so if they do make a purchase I can see which tid is related to the sale. That way I can see which Adwords keywords are more likely to generate a sale, and thus worth a higher CPC bid.

HOWEVER, when they reach my site they will not always go from my page directly through to the merchant’s site. They may click around my site, read articles, browse other product recommendations, etc….I want to figure out a way to use PHP to make sure that tid number stays with the visitor as they click around my site, so I can pass it through to the merchant site when they do eventually click my links leading away from my site.

Does that make sense?