beautypg.com

Google Commerce Search Deployment Guide User Manual

Page 27

background image

tracking parameters--something like ?gaclick=promo--to the end of the URL. Now you have
the ability to generate a report that shows how many times a promotion link was clicked.

Navigation/Browse typically doesn’t need extra tracking parameters in the URL to report on
Navigation usage (separate from search), unless you are using the same URL for site search
and navigation.

Although the URL parameter method is easy, it’s not always recommended. One problem is that
search engines might index duplicate content, so you should exclude those pages with tracking
codes with robots meta tags.

Event tracking
A better, but slightly more complex way is to track the actual clicks, rather than the page view.
This is accomplished using Google Analytics Event Tracking feature.

Event tracking allows you to log data to Google Analytics, independent of a pageview. This is
useful for tracking things like refinements or clicks on recommendations.

Assuming you have the ga.js tracking code already on your search results page, you can add
onClick

events to any of the refinement links:


/search.php?substring=shirts&brand=Acme

"

onClick="_gaq.push(['_trackEvent', 'SearchRefine', 'Brand', 'Acme’]
);">Acme

This logs an event of type “SearchRefine” with action “Brand” and value “Acme”.
Alternatively, you can include a fourth value:

/search.php?substring=shirts&brand=Acme

"


onClick="_gaq.push(['_trackEvent', 'SearchRefine', 'Brand', 'Acme’,’sh
irts’]);">Acme

This logs “shirts” as the query term associated with that refinement.

Adding these onclick events to all refinement URLs will allow a report to be generated showing
the top types of refinements, as well as showing which refinements converted the most.

For product recommendation tracking, a similar approach can be used:

onClick="_gaq.push(['_trackEvent', 'Recommendation', 'Click', '146419'
, '3']);”

This would log a click on a recommended product, id # 146419, in position 3.

For more details on Event Tracking view the “Event Tracking Guide” at

http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html

27