Google Search Appliance Analytics Integration Guide User Manual
Page 13

13
Custom variables are typically used when you want to assign visitors to a specific segment (ie. A/B
testing) or to record page-level data (# of items returned). A custom variable is typically set when the
page loads, as part of the GA initialization code:
_gaq.push(['_setAccount', 'UA-#####-1']);
_gaq.push(['_setCustomVar', 1, 'ZeroResults', 'crufty', 3]);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
Instructions
1. Follow the implementation instructions in
2. Host the clicklog.js file on a server the GSA can reach.
3. Edit a front end by going to Search > Search Features > Front Ends (Previous to Version 7.2:
Serving > Front Ends), selecting Edit on the desired front end, and then clicking Edit
underlying XSLT code.
4. Make edits to your front end according to the table below, copying code from the template to your
stylesheet to reflect the changes in the template, or by copying and pasting the whole
ga_template.xsl. Make sure to set your analytics ID in the ‘analytics information’ section of the
stylesheet and the path to your hosted clicklog_GA.js file.
5. Do a few test searches using the front end, making sure to click on results.
6. Log in to Google Analytics, select the property/tracking ID that you associated with your front end.
7. Click on Content > Events > Overview.
8. Select the appropriate date range for your testing on the top right corner of the report. You should
now see some data regarding your events.
9. Click on Audience > Custom > Custom Variables.
10. Select the custom variable key you would like to examine next to Primary Dimension. Again,
make sure the proper date range has been selected, and you should see some data regarding
your variables.
Custom reports allow you to create a specific view of your data, and will save time if you need to view this
data often. To create your own custom report:
1. Log in to Google Analytics, select the property/tracking ID that you associated with your front end.
2. Click on Custom Reporting.
3. Click on New Custom Report.
4. Name the report in the Title field.