Quick Reference
Overview
The Google Analytics Add-on for Logic Hop allows you to easily track events and pages using Logic Hop Goals.
Any Logic Hop Goal can send event or page data to Google Analytics when Logic Hop Conditions are met or when goals are triggered with Javascript or PHP.
Learn more about Logic Hop Goals.
Use cases for Event Tracking with Logic Hop include tracking:
- Outbound link clicks
- Video playbacks
- Lead scores
- Complex, multi-step actions
Page tracking can be useful for identifying a personalization as a unique page to help quantify and evaluate individual personalization metrics.
Note: Google Analytics functionality requires the Logic Hop Google Analytics Add-on.
Tutorial: Setting Goals & Tracking Events
Configuring Google Analytics
- Install and activate the Google Analytics Add-on plugin
- On the Logic Hop Settings page, input your Google Analytics ID
- Check Enable Javascript Embed to automatically embed the Google Analytics website tracking code on every page of your website
- Leave this box unchecked if you are already embedding Google Analytics using other means
- Click Save Changes
Event Tracking
To enable Event Tracking for a Logic Hop Goal, select Send Event Tracking to Google Analytics on the Google Tracking palette then specify your tracking data.
Tracking Data Options
- Category
- Typically the object that was interacted with (e.g. ‘Video’)
- Action
- The type of interaction (e.g. ‘play’)
- Label (Optional)
- Useful for categorizing events (e.g. ‘Fall Campaign’)
- Value (Optional)
- A numeric value associated with the event (e.g. 42)
- Logic Hop Variables
- Logic Hop variables can also be used as data values using Liquid-style markup such as:
- {{Source}}
- {{LeadScore}}
- {{QueryStore:#variable_name#}}
- Note: Never pass personally identifiable data into Google Analytics
- Logic Hop variables can also be used as data values using Liquid-style markup such as:
Note: Category and Action must be set for the event to be tracked.
Page Tracking
To enable Page Tracking for a Logic Hop Goal, select Send Page Tracking to Google Analytics on the Google Tracking palette then specify your tracking data.
Tracking Data Options
- Title
- The human readable title of the page (e.g. ‘Contact Us’)
- Page
- The path of the page (e.g. /contact-us)
Note: Both Title and Page must be set for the page to be tracked.
Testing Google Tracking
Open an incognito window in your browser and open the Javascript Console.
Locate the Goal Slug from the goal page editor.
Enter the __logichop_goal()__ function in the Javascript Console with your Goal Slug such as:
logichop_goal( 'newsletter-signup' );
Confirm the the data was received in your Google Analytics account under:
Events
- Reports > Real-Time > Events
Pages
- Reports > Real-Time > Content