Set up Google Analytics
Note: There are a few ways you can configure your GA accounts / properties / views. Below is one suggestion if you have single account for ACME with two properties for Production & Testing. Alternatively, you could set up separate accounts for Production and Testing.
TABLE OF CONTENTS
Add a Property
- Go to analytics.google.com
- Navigate to the "ADMIN" section in the left pane at the very bottom.
- Select the Account under which you want to collect analytics (e.g. ACME)
- In the Properties column click "+ Create property" and a new pane will open up.
- Website Name: Enter <PROPERTY_URL>
- Example for testing:
sand10-buy.acmeticketing.net
- Example for production:
buy.acmeticketing.com
- Example for testing:
- Website URL: Enter <PROPERTY_URL>
- Example for testing:
sand10-buy.acmeticketing.net
- Example for production:
buy.acmeticketing.com
- Example for testing:
- Industry Category: Shopping
- Set the correct time zone
- Click "Get Tracking ID" and a new pane will open up. This ID/code will be added to your ACME Theme in backoffice (see "Connect your Google Analytics account with ACME" below)
Add a View
- Back out of the property so you can see all 3 panes
- In the View column click "+ Create view" and a new pane will open up.
- Reporting View Name: <Tenant Name>
- Set the correct time zone
- Create View
Set up Goals
- Back out of the view so you can see all 3 panes
- Click "Goals" from the "View" pane on the far right
There are two types of goals you can configure. The table below outlines when each is triggered.
Goal Type | Goal: Place an Order | Goal: Checkout/Purchase Complete |
---|---|---|
Destination Goal | Goal set when the Checkout page loads (after tapping Place Order) | Goal set when the Confirmation page loads (after tapping Complete Order) |
Action Goal | n/a | Goal set when the Action "Purchase::Complete" is triggered |
Destination Goal › Place an order
- Click "+ NEW GOAL" and a new view will appear
- You may be prompted to use a template in this case use "Place an order" and click "Continue"
- (If not, type in "Place an Order" under the "Goal Description > Name" field
- In field "Goal Description"
- "Goal slot ID" select "Goal Id 1 / Goal Set 1"
- "Type" select "Destination"
- Click "Continue"
- Under "Goal Details > Destination" select "Regular Expression" and enter the following:
- \/checkout\/###\/process\?.*
- Note: Replace ### with your Tenant ID
- Save
Destination Goal › Checkout/Purchase Complete
- Click "+ NEW GOAL" and a new view will appear
- You may be prompted to use a template in this case use "Checkout complete" and click "Continue"
- (If not, type in "Checkout Complete" under the "Goal Description > Name" field)
- In field "Goal Description"
- "Goal slot ID" select "Goal Id 2 / Goal Set 1"
- "Type" select "Destination"
- Click "Continue"
- In field"Goal Details > Destination" select "Regular Expression" and enter the following:
- \/checkout\/###\/confirm\/\d+\?.*
- Note: Replace ### with your Tenant ID
- Save
Action Goal › Checkout/Purchase Complete
- Click "+ NEW GOAL" and a new view will appear
- For "Goal Setup", choose "Custom"
- For "Goal Description", give a desired title (e.g. "Purchase Complete") and set Type to "Event"
- For "Goal Details", set Action equal to "Purchase::Complete"
- Save
Checkout/Purchase Complete The Action Goal was added to the ACME documentation after observing that the Destination Goal was sometimes higher than expected. Destination goal numbers may be inflated due to page refreshes. Google attempts to avoid this by not counting page refreshes during a single user session (reference article).
Connect your Google Analytics account with ACME
- Login to ACME Back Office
- Navigate to "Themes" on the left-hand pane
- Under "Text Variables" set the following variables to contain your Google Analytics Tracking Code/ID (UA Code)(see Useful Tools below on where to find your code)
- "google-analytics-tracking-code": "YOUR PRODUCTION UA CODE HERE",
- "google-analytics-tracking-code-test": "YOUR QA/TESTING UA CODE HERE",
- Click "Update" and wait for the successful confirmation to show and dismiss
- Click the "Email" Tab
- Under "Email Variables" set the following variables to contain your Google Analytics Tracking Code (UA Code)
- "b2c-google-analytics-tracking-code": "YOUR PRODUCTION UA CODE HERE",
- "b2c-google-analytics-tracking-code-test": "YOUR QA/TESTING UA CODE HERE",
- Click "Update" and wait for the successful confirmation to show and dismiss
- Navigate to http://buy.acmeticketing.net/events/###/list
- Note: it may take a moment the first time but it will speed up thereafter.
Testing
- Production: http://buy.acmeticketing.com/events/###/list
- Sandbox: http://sand10-buy.acmeticketing.net/events/###/list
You should now switch over to your Real-Time tab in Google Analytics for the Production or Sandbox and see the data flowing.
- Note: it may take a moment the first time but it will speed up thereafter.
- If you are not seeing data flowing then you can use the tool below to debug and see if and why the data is not propagating.
Useful Tools
- Google Analytics Debugger [Chrome Extension]: (https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna)
- Getting your Tracking Code/ID via Google Analytics