Configuration: Google Analytics for Identity and Arrival
Setup Checklist
Infrastructure |
|
---|---|
1. Download Chrome Extension - Google Tag Assistant and enable it on your Identity site. Required 2. Send Google Tag Manager ID to Aspenware required | Prerequisite |
| Detailed Setup |
Prerequisite Tasks
Infrastructure Tasks
1. Download Chrome Extension
This step is a pre-requisite to confirm that your setup is accurate as you work through the steps of this configuration guide:
Download and install the Chrome Extension Google Tag Assistant.
Go to your Identity URL and click the extension icon in the Chrome browser plugin area and click Enable.
Refresh the page to show results and the image below shows how the plugin will appear when properly loaded.
NOTE: This step above will not show your GTM info until you have completed the remaining steps within this guide.
2. Send Google Tag Manager ID to Aspenware
The GTM container defines the correct Google Tag Manager account for tracking and should reference the correct GTM ID that appears in your GTM account. Within the GTM Workspace, Google provides install instructions to insert the highlighted code, also known as a container, into the head of every page on your site. The GTM container is pre-programmed into Identity.
Once your GTM ID is created, send the ID to your Aspenware Service Agent so they can add it to your Identity configuration settings. You can find the GTM ID in the Google Tag Manager workspace, in the upper right corner. Copy the GTM code and send it to Aspenware if this code has changed or needs to be updated.
Open Google Tag Assistant on your Identity URL (login.yourdomain.com) and ensure it is enabled. The list of results should include Google Tag Manager with your GTM ID. If the Google Tag Manager code doesn’t appear in Google Tag Assistant, like in the image below, then the setup is incomplete. Contact Aspenware support@aspenware.com if your GTM container is not present.
Detailed Setup Guide
1. Set Up Google Analytics ID Variables within the GTM Workspace
A GTM ID on every page is not a replacement for a Google Analytics Tracking ID, so the Google Analytics Tracking ID (e.g. UA-XXXXXX) should also be included on every page. Because Aspenware Identity is a single-page application, moving between pages does not trigger events using traditional page views. Instead, the site utilizes virtual pageviews, which require a special setup in GTM. Follow the steps below.
Check your setup - Open Google Tag Assistant and confirm that Google Analytics shows as the first row. You should see Google Analytics with your Google Analytics Tracking ID in the list of results. If your Tracking ID doesn’t appear in Google Tag Assistant like the image below, then the setup is incomplete. If your setup matches the desired setup, proceed to continue checking the setup. If your setup does not match the desired setup, view the section below and continue following the steps to set it up properly.
If your setup does not match the desired setup, go to http://tagmanager.google.com > Variables > under User-Defined Variables > click the New button. Give the new variable the following settings:
Title: Virtual Page URL - ID & Arrival
Variable type: Data Layer Variable
Data Layer Variable Name: Type - “content-name”
Version: Version 2
Save the variable.
Create a second new Variable:
Title: Virtual Page Title - ID & Arrival
Variable type: Data Layer Variable
Data Layer Variable Name: Type - “content-view-name”
Version: Version 2
Save the variable.
Create a third new Variable: NOTE: The same Tracking ID variable that is set up for Aspenware Commerce GTM can be used here. All other variables, triggers, and tags are uniquely set up.
Title: Tracking ID
Variable type: Constant
Value: Enter the Google Analytics Tracking ID (found within Google’s Google Analytics Admin screen http://analytics.google.com on the desired property and starts with “UA”)
Save the variable.
(Optional) The following step is only needed if the domain for your Identity site is different from the domain for your store and/or Arrival site. (e.g. if your identity URL is http://login.boyneresorts.com and your store URL is http://shop.bigskyresort.com , then you’d want to configure this step to enable cross-domain tracking.)
Create another new Variable
Title: Auto Link Domains
Variable type: Constant
Value: add the domains for all sites that you’d like to enable cross-domain tracking on in a comma-separated list. In the example above, you’d add http://boyneresorts.com , bigskyresorts.com.
Create another new Variable:
Title: Google Analytics - ID & Arrival
Variable type: Google Analytics Settings
Tracking ID: Add the Tracking ID you created in the step before (e.g. {{Tracking ID}})
Cookie Domain: auto
Open More Settings
Click Fields to Set > Click + Add Field > Input Field Name as “page” > input Value as “{{Virtual Page URL- ID & Arrival}}”
Click + Add Field > Input Field Name as “title” > input Value as “{{Virtual Page Title}}”
(Optional) The following steps are only needed if the domain for your Identity site is different from the domain for your store and/or Arrival site. (e.g. if your identity URL is login.boyneresorts.com and your store URL is shop.bigskyresort.com , then you’d want to configure this step to enable cross-domain tracking.)
Click + Add Field > Input Field Name as “allowLinker” > input Value as “true”
Click Cross Domain Tracking > Input Auto Link Domains as “{{Auto Link Domains}}” > input Use Hash as Delimiter as “False” > input Decorate Forms as “True”
Save
NOTE: GTM Variable setup outlined in this document will be applicable to Aspenware Identity and Arrival, but Commerce requires a unique setup that is outlined in the Commerce Google Analytics setup guide.
2. Set Up Virtual Pageviews within the GTM Workspace
Every time a user goes to a page within the single page application, a virtual pageview occurs; however, a standard pageview does not occur. This is the recommended setup for populating the Google Analytics Tracking ID and for tracking virtual pageviews as pageviews:
Check your setup - Ensure that Google Tag Manager setup is correctly triggering virtual pageviews in Google Analytics. To see if the setup is correct, go to your site and open up a product detail page. Then, open the Google Tag Assistant (it must be enabled first) and follow these steps:
In the Google Tag Assistant, select Google Analytics from the results.
From within Google Analytics, notice the number of pageview requests displayed towards the bottom of the assistant.
Select Pageview Requests.
There should be 1 pageview when you first load Identity, 2 pageviews after the first page is navigated to, and so on.
Tab through each page view using the arrows to the right of Google Tag Assistant (see diagram). If you opened the shop, and then clicked into the product, there should be 2 page views with the following information (examples below):
Pageview 1: Title - should be the name of your store or the page you landed on. Title and tracked page - tracked page should be the category portion of the URL (e.g. /lift-passes/)
Pageview 2: Title and tracked page - tracked page should be the category portion of the URL and the product portion of the url (e.g. /lift-passes/full-day-lift-passes/)
If your setup does not match the desired setup, go to http://tagmanager.google.com > Triggers > and select New to create a new trigger:
Title: Virtual Page View - ID & Arrival
Type: Custom Event
Event Name: content-view
This Trigger Fires on: All Custom Events
Save the trigger.
Go to your GTM Workspace > Select Tags > click New to create a new tag:
Title: GA Page View - ID & Arrival
Click the Tag Configuration block and choose “Google Analytics: Universal Analytics”
Track Type: Page View
Google Analytics Settings: Set to the new variable created in the step above called “{{Google Analytics - ID & Arrival}}”
Before saving complete the step below
Next, select the Triggering section and add a new trigger
Choose the trigger you created in an earlier step titled “Virtual Page View - ID & Arrival”
When you are finished, your new tag should look like the image below. Once it matches the following configuration, Save your new tag.
To see this successfully working, preview your changes and then publish your changes made in GTM workspace.
To see this showing up in your live site, preview and then publish to see this new tag capturing pageview data.