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
- Click on Admin in the navigation bar. The Admin page of Google Analytics has three columns: Account, Property, and View.
- Select the main account for your website under Account.
- 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.
- Select Create Property.
- Enter a Property name. We recommend that you indicate which environment the property relates to as well. For example, “My Website Name – Sandbox.”
- Update the Reporting time zone and Currency fields, as necessary.
- Click Show advanced options, then toggle Create a Universal Analytics to On.
- Enter the URL for your site in Website URL.
- Click the checkbox for Create a Universal Analytics property only.
- Click Next.
- Fill out any information you choose in the About your business section.
- 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
- Return to the Admin page.
- Select the All Web Site Data view and click View Settings.
- Update the site’s Time zone country or territory and Currency displayed as, if required.
- Ensure the checkbox for Exclude all hits from known bots and spiders is checked under the Bot Filtering section.
- Ensure the Site Search Tracking toggle is On.
- Click Save.
- Click Ecommerce Settings.
- Toggle Enable Ecommerce to On.
- 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.