I have pay per click adverts set up through google. I need to some how get hold of the search query used on google and use this data on the php script that the advert links to.
e.g. if someone searches "banana in london" and my ad is displayed, on the url the ad is linked to I need to get hold of the search query "banana in london"
I need somthing that does this or as close as we can get it,
I'm not sure but I believe that you want this:
https://support.google.com/adwords/answer/2454041?hl=en
You can add the keyword insertion code within the headline, description lines, or URL fields. There are 2 ways you can insert a keyword: the guided method or the manual method.