Google Analytics Events

Google Analytics Events

On-site product recommendations and search delivered by helloretail can be configured to send events to google analytics. When the feature is enabled the helloretail script will try to find an instance of the google analytics tracker on your site and use that to send the events. You can read more about Event Tracking with google analytics here.

Finding a tracker

The script starts by looking for an object named either __gaTracker or ga. If an object is found the script will use the first tracker returned from a call to getAll() on the object.

If neither __gaTracker or ga is found the script will look for the legacy version of the google analytics tracker by looking for an object named _gaq.

Sending events

Product recommendations can send events when they are viewed and when a product in the recommendations are clicked. Search boxes can send events when the search box is used and when a search result is clicked. The category, action, and label for each event can be configured. The event sent when a product recommendation is viewed is sent as a nonInteraction-event, the other three events are sent as interaction events.

The events for clicks on product recommendations or search results are sent when the user lands on the page of the product she clicked

Examples

When a product recommendation for the front page of a shop is viewed the script could be configured to send an event like this

ga("send", "event", "Addwish", "Product box view", "Frontpage", {'nonInteraction' : 1});

When a product in the recommendation is clicked script will send an event like this

ga("send", "event", "Addwish", "Product box click", "Frontpage", {'nonInteraction' : 0});

Where to find Event info in Google Analytics

If you navigate to Behaviour > Events > Overview when logged in to your Google Analytics, you'll here find the detailed Event stats, broken down by "Category" (this will always be helloretail), "Action" (this could be click or view, grouped as either Search or Recommendations) and "Label" (name of the search configuration or the product recommendation box):

 

Like Follow
  • 1 yr agoLast active
  • 73Views
  • 1 Following