Many of my client's websites were getting plenty of traffic from Google Image search. These visits from Google Image search is shown under Referring site and the keyword would be shown as 'not set'. These visits had brought sales or leads to the site. These clients need to know the keywords which was searched in Google image search and brought them sales or leads.
How to Track Google Image Search Keywords in Google Analytics?
First of all, the traffic from Google image search will be transferred from 'Referring site' to 'Organic'. For this we have to add a small code in the existing Google analytics code.
<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 type='text/javascript'>
try {
var pageTracker = _gat._getTracker("UA-xxxxxxx-x");
pageTracker._addOrganic("images.google", "prev");
pageTracker._trackPageview();
} catch(err) {}
</script>
Picture shot of the above code is given below.

In the above code, the line marked bold [ pageTracker._addOrganic("images.google", "prev"); ] is to be added to the code and uploaded in all pages. This will make sure that all the visits from Google image search will be now shown in Organic.
Now we will be adding a filter in your Google analytics to track Google image search keywords. For this you have to login to your Google Analytics profile.

In the Analytics Settings 'Overview' page, click on the edit button to the profile for which you want to find the Google image search keywords.

You have reached the profile settings page. You can see the third box shows as 'Filters Applied to Profile'. Click the 'Add Filter' Link.

You are at 'Create New Filter' page. Select the button 'Add new Filter for Profile'. Now enter the filter information.
Filter Name: Google Images - Extract keywords
Filter type: Custom filter – Advanced (Select the button)
Field A -> Extract A: Campaign Term, /images?(.*)(q|p)=([^&]*)
Output To -> Constructor: Campaign Term: $A3
Field A Required: Yes (Select the button)
Field B Required: No (Select the button)
Override Output Field: Yes (Select the button)
Case Sensitive: No (Select the button)
Now click on 'Save Changes'. You have finished with the filter.

You can view the keywords list at 'Traffic Sources' >> 'Search Engines' and select 'images.google'.
If you find this post more useful please comment on the post and subscribe to my blog to receive latest updates.
