Set up Universal Analytics for your website

  • Updated

Universal Analytics (GA3) will be sunsetted in July 2023. New clients should implement Google Analytics 4 (GA4), rather than Universal Analytics.

Implementation of Universal Analytics requires a testing process. Optimizely recommends that you implement Universal Analytics on your Sandbox site first and verify accurate tracking of user events before recreating the tracking on your Production site. The following steps will need to be completed twice: once for Sandbox and once for Production.

You can also view our documentation on Google Analytics for more help.

Create or sign in to your Google Analytics account

Follow the instructions on this page at Google Analytics Help to create a Google Analytics account if you do not have one. If you already have a Google Analytics account, click Sign into Analytics at https://analytics.google.com.

Create a new Property for your site and environment

  1. Click on Admin in the navigation bar. The Admin page of Google Analytics has three columns: Account, Property, and View.
  2. Select the main account for your website under Account.
  3. Review the list of Properties to see if your site has been set up. If so, you may skip to Step #2 Setting up Google Tag Manager.
  4. Select Create Property.
  5. Enter a Property name. We recommend that you indicate which environment the property relates to as well. For example, “My Website Name – Sandbox.”
  6. Update the Reporting time zone and Currency fields, as necessary.
  7. Click Show advanced options, then toggle Create a Universal Analytics to On.
  8. Enter the URL for your site in Website URL.
  9. Click the checkbox for Create a Universal Analytics property only.
  10. Click Next.
  11. Fill out any information you choose in the About your business section.
  12. Click Create.

Your property has now been created. Note the Tracking ID.

Add custom dimensions to your Property

Find the Custom Definitions submenu, and go to Custom Definitions > Custom Dimensions. You will add three Custom Dimensions to this table. The three dimensions should be created in the order indicated below.

Click on + New Custom Dimension. Enter the name Authentication State with a Scope of Hit. Ensure the Active checkbox is checked. Then click Create. The code snippets provided on the next page are not needed at this time. Click Done.

Click on + New Custom Dimension. Enter the name User ID with a Scope of Hit. Ensure the Active checkbox is checked. Then click Create.

Click on + New Custom Dimension. Enter the name Session ID with a Scope of Session. Ensure the Active checkbox is checked. Then click Create.

Adjust settings of primary view

  1. Return to the Admin page.
  2. Select the All Web Site Data view and click View Settings.
  3. Update the site’s Time zone country or territory and Currency displayed as, if required.
  4. Ensure the checkbox for Exclude all hits from known bots and spiders is checked under the Bot Filtering section.
  5. Ensure the Site Search Tracking toggle is On.
  6. Click Save.
  7. Click Ecommerce Settings.
  8. Toggle Enable Ecommerce to On.
  9. Leave the Enable Enhanced Ecommerce Reporting toggle Off.

You have now completed a basic setup for Universal Analytics. Once you have verified the data in Sandbox, you need to repeat the steps for Production. The setup for production will be identical to Sandbox but will have a property.

You can watch the Google Analytics for Beginners video at Google Analytics Academy to learn more.

You can also view our documentation on Universal Analytics and Google Analytics 4.