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
- Create a goal for 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
- Create goal for Checkout 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
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
Navigate to your ACME Online Ticketing site, such as:
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