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

  1. Go to analytics.google.com
  2. Navigate to the "ADMIN" section in the left pane at the very bottom.
  3. Select the Account under which you want to collect analytics (e.g. ACME)
  4. In the Properties column click "+ Create property" and a new pane will open up.
  5. Website Name: Enter <PROPERTY_URL> 
    1. Example for testing: sand10-buy.acmeticketing.net
    2. Example for production: buy.acmeticketing.com
  6. Website URL: Enter <PROPERTY_URL>
    1. Example for testing: sand10-buy.acmeticketing.net
    2. Example for production: buy.acmeticketing.com
  7. Industry Category: Shopping
  8. Set the correct time zone
  9. 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

  1. Back out of the property so you can see all 3 panes
  2. In the View column click "+ Create view" and a new pane will open up.
  3. Reporting View Name: <Tenant Name>
  4. Set the correct time zone
  5. Create View


Set up Goals

  1. Back out of the view so you can see all 3 panes
  2. Click "Goals" from the "View" pane on the far right
  3. Create a goal for Place an order
    1. Click "+ NEW GOAL" and a new view will appear
    2. You may be prompted to use a template in this case use "Place an order" and click "Continue"
      1. (If not, type in "Place an Order" under the "Goal Description > Name" field
    3. In field "Goal Description"
      1. "Goal slot ID" select "Goal Id 1 / Goal Set 1"
      2. "Type" select "Destination"
    4. Click "Continue"
    5. Under "Goal Details > Destination" select "Regular Expression" and enter the following:
      1. \/checkout\/###\/process\?.* 
      2. Note: Replace ### with your Tenant ID
    6. Save
  4. Create goal for Checkout complete
    1. Click "+ NEW GOAL" and a new view will appear
    2. You may be prompted to use a template in this case use "Checkout complete" and click "Continue"
      1. (If not, type in "Checkout Complete" under the "Goal Description > Name" field)
    3. In field"Goal Description"
      1. "Goal slot ID" select "Goal Id 2 / Goal Set 1"
      2. "Type" select "Destination"
    4. Click "Continue"
    5. In field"Goal Details > Destination" select "Regular Expression" and enter the following:
      1. \/checkout\/###\/confirm\/\d+\?.*
      2. Note: Replace ### with your Tenant ID
    6. Save


Connect your Google Analytics account with ACME

  1. Login to ACME Back Office
  2. Navigate to "Themes" on the left-hand pane
  3. 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)
    1. "google-analytics-tracking-code": "YOUR PRODUCTION UA CODE HERE", 
    2. "google-analytics-tracking-code-test": "YOUR QA/TESTING UA CODE HERE",
  4. Click "Update" and wait for the successful confirmation to show and dismiss
  5. Click the "Email" Tab
  6. Under "Email Variables" set the following variables to contain your Google Analytics Tracking Code (UA Code)
    1. "b2c-google-analytics-tracking-code": "YOUR PRODUCTION UA CODE HERE",
    2. "b2c-google-analytics-tracking-code-test": "YOUR QA/TESTING UA CODE HERE",
  7. Click "Update" and wait for the successful confirmation to show and dismiss
  8. Navigate to http://buy.acmeticketing.net/events/###/list 
    • Note: it may take a moment the first time but it will speed up thereafter.


Testing


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