After July 2021, the 2.3.x release line no longer received quality updates or user guide updates. PHP 7.3 reached end of support in December 2021, and Adobe Commerce 2.3.x reached end of support in September 2022. We strongly recommend upgrading to Adobe Commerce 2.4.x to help maintain PCI compliance.

Google Analytics

This site contains archived merchant documentation for a version of Adobe Commerce and Magento Open Source that has reached end-of-support. The documentation available here is intended for historical reference only and is not maintained. The Adobe Commerce Merchant Documentation for current releases is published on the Adobe Experience League.

Google Universal Analytics gives you the ability to define additional custom dimensions and metrics for tracking, with support for offline and mobile app interactions, and access to ongoing updates.

If your business is subject to privacy regulations such as the General Data Protection Regulation and/or the California Consumer Privacy Act, see Google Privacy Settings.

Sales configuration - Google API Google Analytics

Step 1. Sign Up for Google Universal Analytics

Visit the Google website, and sign up for a Google Universal Analytics account.

Step 2. Complete the Magento Configuration

  1. Log in to the Admin for your Magento store.

  2. On the Admin sidebar, go to Stores > Settings > Configuration.

  3. In the left panel, expand Sales and choose Google API.

  4. Expand Expansion selector the Google Analytics section and do the following:

    • Set Enable to Yes.

    • Enter your Google Analytics Account Number.

    • If you want to conduct A/B testing and other performance tests on your content, set Content Experiments to Yes.

  5. When complete, click Save Config.

If you enable the Cookie Restriction Mode, Google Analytics will not collect data about visitors unless they have accepted cookies.