Magento 2 Google Analytics

Magento 2 Google Analytics

Magento 2 Google Analytics setup for a smooth integration between tracking in GA and your store.

_Google Analytics is a web analytics service offered by Google that tracks and reports website traffic. It comes out-of-box in each Magento 2 install and doesnt need to be downloaded only Configured_

Code #

The Google Analytics Tracking Code can be obtained from your Analytics Account

  1. In your GA Dashboard click on “Admin” in the menu on the left:

Select Admin

  1. Now you click on the “Tracking Info” then “Tracking Code” link that appears, all located in the “Property” column:

Select Tracking Info

  1. Copy the Tracking ID that is in the “UA-11111111-1” format to be pasted into Magento Admin Panel.

Copy Tracking ID

Setup #

  1. Login into your Magento Admin area

    Login

  2. From the left menu hover over “Stores” and then click on “Configuration”

    Navigate to System -> Configuration

  3. Scroll down the second left menu to “Sales” then click on “Google API”

    Navigate to Sales -> Google API

  4. In the “Google API” Dashboard select first “Enabled” to “Yes”, this will toggle the Google Analytics extension ON and allow you to specify the “Account Number”, where “Account Number” is the Code we copied from the Google Analytics account.

Set Enabled to Yes and paste the GA tracking code

eCommerce tracking #

Anonymize IP #

Anonymize IP is a option that can be configured in the Magento backend, steps 1 to 3 can be followed from Setup and for the last step “Anonymize IP” can be set to “Yes” via select.

Anonymize IP set to Yes

Enhanced Commerce #

Enhanced Commerce is only available in the Enterprise version of Magento 2.

Content Experiements #

Not Working #

Things to check if Google Analytics are not working on your Magento 2 store:

Extension #

Need help with Magento 2 Google Analytics ?