http://www.example.com/?gkw={KEYWORD}
This way, I can log the keyword that the user matched when they found my ad and clicked it (I realize that there are other ways to do this - ie: adwords conversion tracking pixels - but I use this data for some custom tracking).
I recently opened an Analytics account and linked it with my AdWords account. Doing so enabled "auto-tagging" in my AdWords account which changed the destination URLs of my ads to something like this:
http://www.example.com/?gclid=#*$!#*$!#*$!#*$!
This is great for tracking my campaigns between AdWords and Analytics, but now my custom tracking is not able to log the keyword.
Is it possible to combine the two? I'd like to have my destination URLs to be something like this:
http://www.example.com/?gkw={KEYWORD}&gclid=#*$!#*$!#*$!#*$!
Any help here would be greatly appreciated.
Thanks
I'm hoping that doing so is possible using the AdWords API to "look up" the associated keywords using the gclid value as a reference.
If anyone knows how to do this or has come across any resources on the subject, please share them here.
If I find anything, I will post it here.
you should be able to use both {{keyword} and gclid) in your urls
I'm not clear on how to do this. Ideally, I could just use this as my destination URL for all of my ads:
http://www.example.com/?gkw={keyword}&gclid={gclid}
However, the {gclid} value is not being dynamically replaced; doesn't look like this feature exists.
Thoughts?
If you activate auto-taging gclid is automatically appended to your urls (ad or keyword).
From my experience, this is not exactly the case. Enabling auto-tagging changes the URL that my ads resolve to to something like:
http://www.example.com/?gclid={gclid}
So the gclid is not appended to my existing destination URLs but rather it replaces what I have put there. For example, if this is one of my destination URLs:
http://www.example.com/?gkw={keyword}
And then I enable auto-tagging, the actual URL that the ad resolves to will be:
http://www.example.com/gclid=#*$!#*$!#*$!
Whereas if the gclid was being appended, the URL should be:
http://www.example.com/?gkw=somekeyword&gclid=#*$!#*$!#*$!
Still fighting with this....
Example from one of my accounts:
Keyword URL in my Adwords account:
http://example.org/track/{keyword}
Request after a click from my log files:
http://example.org/track/widget?gclid=CK6N6MTKJGKJQFCZwodig4vXA
Perhaps it works for me because I use virtual folders (mod_rewrite) and not real parameters to append {keyword}
My new solution was to create an html page for each of my keywords, with the keyword in the name of the page. For example:
Keyword "widget":
http://www.example.com/promo/widget.html
Keyword: "widget information":
http://www.example.com/promo/widget-information.html
My custom tracking is built in PHP. To allow .html files to execute PHP scripts, I put this line of code in my .htaccess file:
AddType application/x-httpd-php .htm .html
So my html destination URLs can all include my PHP tracking file. This custom tracking uses to following code to get the file name of the page:
$currentFile = $_SERVER["SCRIPT_NAME"];
$parts = explode('/', $currentFile);
$currentFile = strtolower($parts[count($parts) - 1]);
Then I extract the keyword from this file name (by removing the ".html" and changing dashes "-" to spaces) and using it for my custom tracking.
I also enabled auto-tagging to get the gclid appended to the URL, linking my Adwords account with my Analytics account, ie:
http://www.example.com/promo/widget.html?gclid=#*$!#*$!
http://www.example.com/promo/widget-information.html?gclid=#*$!#*$!
Mission accomplished.