Track Exact AdWords Keywords with Google Analytics
Google Analytics does not natively track the exact search query that was used by a visitor from an AdWords ad.
Download the Exact AdWords Keywords script from below, put it to your website, and you will find out the entire search phrases that triggered your AdWords ads and their respective performance.
Why Would You Track Exact AdWords Keywords?
The benefits of using the Exact AdWords Keywords script:
- Find efficient keywords for SEO and exact matches in AdWords by testing broad matches and phrase matches, together with Google Analytics goals and the script you have downloaded from this page.
- Find out good negative keywords to fine-tune your AdWords campaigns, and save a lot of money.
- Discover the right words for all marketing: get a clear picture what kind of vocabulary and phrases your most valuable visitors use, and employ it in all your marketing.
To get these benefits, just grab the zip file below and follow the simple installation instructions.
Download script: exact_adwords_keywords.zip
Version: 1.0
Published: 27.8.2008
Author: Jani-Matti Hätinen
The idea and some implementation details originated from Michael Harrison’s Google Analytics Keyword Sleuth script.
Advantages of this script over Keyword Sleuth:
- Conversion to lowercase.
- Full UTF-8 character support.
NOTE: This script works only with ga.js tracking code, not the earlier urchin.js.
Installation
Step by step instructions:
- Download the zip file from above.
- Unzip it.
- Upload exact_adwords_keywords.js to your server.
- Replace the standard tracking code with the one below:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script src="http://www.yourdomain.com/exact_adwords_keywords.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._trackPageview();
</script>
NOTE: Replace UA-XXXXXX-X with your Google Analytics account ID and the path of the exact_adwords_keywords.js with your own.
Where to Find the Exact Keyword Data?
Log in to your Google Analytics account and go to Visitors > User Defined. There you will find the list of the exact search keywords.
In some report views, you can also choose the User Defined option from the “Dimension” dropdown list.
How Does It Work?
This script takes the full search string used to get to your site through an Adwords ad click and adds it to the User Defined variable of Google Analytics. As this variable can be utilized only once per visit, you cannot use the underlying pageTracker._setVar function for other purposes on your website.
The script converts the search string to lowercase and fixes all two-byte UTF-8 characters.

Jaa Twitterissä