Configuration: Universal Analytics (formerly Google Analytics)
- 1 Setup Checklist
- 2 Prerequisite Tasks
- 3 Detailed Setup Guide
- 3.1 1. Set Up Google Analytics ID Variables within the GTM Workspace
- 3.2 2. Set Up Virtual Pageviews within the GTM Workspace
- 3.3 3. Track Google Analytics Transaction Data
- 3.4 4. Track Day of Arrival for Ecommerce Transaction Analytics (Optional)
- 3.5 5. Track Due on Arrival Transactions for Golf Tee Times (Optional)
NOTE: This original iteration of Google Analytics, also known as Universal Analytics (UA), will be sundowned by Google on July 1, 2023. UA and GA4 can be run simultaneously to allow resorts to import and interpret new GA4 data while maintaining current UA data.
Setup Checklist
INFRASTRUCTURE TASKS |
|
---|---|
1. Download Chrome Extension - Google Tag Assistant and enable it on your ecommerce site. Required 2. Set up Google Tag Manager Container (Work with Aspenware Representative) 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 ecomm 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. Set up Google Tag Manager Container (work with Aspenware representative)
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 and ID are configured within your site’s code and cannot be changed without development. Contact Aspenware at support@aspenware.com to update your GTM container. Within your Google Tag Manager workspace, notice the GTM ID 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 shop.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 ski-support@aspenware.com if your GTM container is not present.
Detailed Setup Guide
1. Set Up Google Analytics ID and Virtual Page View (set up in GTM Workspace)
2. Track Google Analytics Transaction Data
3. Confirm Data Layer Setup
4. Track Day of Arrival for Ecommerce Transaction Analytics (Optional)
5. Track Due on Arrival Transactions for Golf Tee Times (Optional)
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 Commerce 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 in 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 sub-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
Variable type: Data Layer Variable
Data Layer Variable Name: Type - “virtualPageURL”
Version: Version 2
Save the variable.
Create a second new Variable:
Title: Virtual Page Title
Variable type: Data Layer Variable
Data Layer Variable Name: Type - “virtualPageTitle”
Version: Version 2
Save the variable.
Create a third new Variable:
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.
Create a fourth new Variable:
Title: Google Analytics
Variable type: Google Analytics Settings
Tracking ID: Input the Tracking ID found within http://analytics.google.com/ (i.e: UA-#####-#)
Cookie Domain: auto
Open More Settings
Click Fields to Set > Click + Add Field > Input Field Name as “page” > input Value as “{{Virtual Page URL}}”
Click + Add Field > Input Field Name as “title” > input Value as “{{Virtual Page Title}}”
Save
2. Set Up Virtual Pageviews within the GTM Workspace
Every time a user goes to a page, new category, product, or step of checkout 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 displays towards the bottom of the assistant.
Select Pageview Requests.
There should be 1 pageview when you first load the shop, 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
Type: Custom Event
Event Name: VirtualPageview
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 Pageview
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}}”
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”
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.
3. Track Google Analytics Transaction Data
Aspenware E-commerce includes the foundations of what is needed to track transactions by capturing transaction information in the Data Layer upon order completion. Transaction information that is captured includes order number, product skus, product names, product cost, transaction total, etc. In order for this information to be properly populated in Google Analytics, a tag and trigger must first be set up. To determine if your GTM account is properly set up for capturing transaction data, review the following steps:
Check your setup - Enable Google Tag Assistant within your test or live shop before you begin checkout. Go into the shop or test shop and complete a transaction. Open the Google Tag Assistant and see if the following (see screenshots below) is true for your setup. If your Google Analytics code does not appear in Google Tag Assistant and match the image below, then your setup is incomplete and you can follow the steps below:
Select Google Analytics from the results
From within Google Analytics, notice an area toward the bottom of the assistant with Transaction and select this:
Page between the Transaction tabs. The first page lists the product, or order item information, and the second page lists the order total information on the metadata tab.
If your setup does not match the desired setup, ensure Ecommerce is enabled in your Google Analytics reports, and then follow these steps:
Sign in to Google Analytics
Click Admin, and navigate to the view you want
In the VIEW column, click Ecommerce Settings
Set Enable Ecommerce to ON
Save settings.
Next, go to your GTM Workspace http://tagmanager.google.com > click Triggers > and click New to create a new trigger:
Title: Event Transaction Complete
Trigger type: Custom Event
Event Name: transaction-complete
This trigger fires on: All Custom Events
Click Save to save the trigger
Next click the Tags section > then click New to create a new tag:
Title: Transaction
Tag type: Google Analytics: Universal Analytics
Track Type: Transaction
Google Analytics Settings: {{Google Analytics}}
Then click Triggering and set the Trigger to the trigger created in an earlier step “Event Transaction Complete”
Click Save to save the tag.
NOTE: There are two versions of Google Analytics and each requires different selections here and there in GTM. If customers are still using Classic Analytics, the same basic setup of tags will take place. However, for Tag Type, select Classic Analytics instead of Universal Analytics at this step.
Once you have tested an order in preview mode to ensure the newly created tag is firing on order complete, publish your changes.
4. Track Day of Arrival for Ecommerce Transaction Analytics (Optional)
Date-based products, such as lift tickets, rentals, lessons, etc. that are sold through the Aspenware Commerce platform have both a purchase date and an arrival date. With the release of 1.11.2, both the purchase date and arrival date can be tracked and reported in Google Analytics, this allows for deeper analysis on how pricing and promotions drive purchases for specific arrival dates.
NOTE: Golf has a unique setup for this feature to accommodate the collection of fees for tee times upon arrival. Please see the next section for configuration details.
Day of Arrival data has been added to the transaction data layer to enable reporting this information for ecommerce sites. In order to report on arrival dates, a Variable for Transaction Arrival should be set up and then added to the Google Analytics variable for reporting in GA. To set this feature up, follow these steps:
Go to http://analytics.google.com > select Admin > under Property select Custom Definitions > then select Custom Dimensions
Select New Custom Dimension and set it up as follows:
Name: Start Date
Scope: Hit
Active: Checked
Save it.
Once saved, a custom dimension Index number will be assigned to the new dimension. You will use this number in your GTM Setup.
Go to your GTM workspace http://tagmanager.google.com > click Variables > select New to create a new User-Defined Variable.
Name: DLV- Transaction Day of Arrival
Variable Type: Data Layer Variable
Data Layer Variable Name: startDate
Data Layer Version: Version 2
Save the variable.
Click Tags > open the “Transaction” tag variable
Google Analytics Settings: Update to “Select Settings Variable”
Enable overriding settings in this tag: Checked
Tracking ID: Choose the Tracking ID variable that links to your Google Analytics tracking ID (i.e: {{Tracking ID}}).
Open up More Settings, and then expand Custom Dimensions. Add a Custom Dimension.
Index: Enter the Index number of the custom variable created above in GA Admin, i.e. 1, 2, etc.,
Select the lego looking icon
Choose the new DLV- Transaction Due on Arrival variable you just created.
Save the Transaction Tag.
When you go into Google Analytics and filter data by secondary dimensions, Start Date is an option under the Custom Dimensions menu.
5. Track Due on Arrival Transactions for Golf Tee Times (Optional)
Golf tee times are unique from other products because they do not charge to reserve a tee time online, but rather charge the guest at the time they check-in. Ecommerce collects a Due on Arrival rate and charges nothing for the transaction total. Therefore analytics needs to be able to accurately reflect the amount that will be charged for the reserved tee times.
Due on Arrival data has been added to the transaction data layer to enable reporting this information for ecommerce sites that sell tee times. The total transaction amount has also updated to reflect the sum of the total paid for the order online and the amount due on arrival. In order to report on Due on Arrival rates, a Variable for Transaction Due On Arrival should be set up and then added to the Google Analytics variable for reporting in GA. This should be completed after GTM is set up in accordance with instructions in the Configuration: Google Analytics document.
From within your GTM Workspace go to Variables and select New to create a new User-Defined Variable.
Name: DLV- Transaction Due on Arrival
Variable Type: Data Layer Variable
Data Layer Variable Name: transactionDueOnArrival
Data Layer Version: Version 2
Save the new variable.
Within Tags, open the “Transaction Tag” variable and edit it.
Google Analytics Settings: Update to “Select Settings Variable”
Enable overriding settings in this tag: Checked
Tracking ID: Choose the Tracking ID variable that links to your Google Analytics tracking ID (i.e: {{Tracking ID}}).
Open up More Settings, and then expand Custom Dimensions. Add a Custom Dimension.
Index: 1
Dimension value: Select the lego looking icon
Choose the new DLV- Transaction Due on Arrival variable you just created.
Save the Transaction Tag.
Go to Custom Definitions (under Property)> Custom Dimensions within your Google Analytics admin.
Select New Custom Dimension and set it up as follows:
Name: Due on Arrival
Scope: Hit
Active: Checked
Save the Custom Dimension.
Now, when you go into Google Analytics and filter data by secondary dimensions, Due on Arrival is an option under the Custom Dimensions menu.