cancel
Showing results for 
Search instead for 
Did you mean: 

Google Analytics - Measurement ID

Google Analytics - Measurement ID

Hello,

 

In the past, we were adding the Tracking ID of the Google analytics in Stores->Configuration->Sales-> Goolge API

However, in a new project, There is no longer Tracking ID, but Measurement ID.
My question is how to implement this id in Magento 2.3.5 ? 
Should we add the ID in Google API as tracking ID or we should do anything else ?

4 REPLIES 4

Re: Google Analytics - Measurement ID

If I'm following your question, the new measurement ID should be the same, however the new Google Analytics, while better, doesn't yet see the eCommerce sale individually from Magento. As a result, we've fallen back to the previous Analytics version since it's the only way we can actually see the whole sales cycle reflected in Analytics. 

 

This is unfortunate since there's so much more available in the new Analytics and we'd like to use it, but until the structure of Magento is rewritten for this, even 2.4 currently dooesn't handle it.

 

WeltPixel has a new Analytics GA4 module, which probably does handle this new structure, but I haven't tried this yet.....

 

Not sure if that helps.....


Thank you,
Mike.

Re: Google Analytics - Measurement ID

Hi @achahinewiffa8,

 

Please follow these steps in order to add Google Analytics code to Magento 2: 

 

Step 1: Create account and set up in Google Analytics 

Kindly refer to this link to sign up an account on Google Analytics. 

 

Step 2: Complete the Magento configuration

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

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

3. On your 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 Experiment to Yes

5. When you're done, click Save config

 

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

or you can refer to this article for more information. 

 

Hope this can help you! Let me know if you need further assitance.

__________

If issue solved, Click Kudos & Accept as Solution.

LitExtension - #1 Shopping Cart Migration Expert

LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.

Visit website: http://litextension.com/

Re: Google Analytics - Measurement ID

Hi,

 

Unfortunately, the older versions of Magento do not support GA4 out of the box, unlike Universal Analytics. The GA4 is available in Magento 2.4.5 however it doesn't completely utilize the new Google Analytics 4 features. It has so much more than meets the eye if implemented correctly.You can enable it in the same way Stores->Configuration->Sales-> Goolge API>Google GTag> Google Analytics 4.  There are two ways by which you can implement the new full GA4 on older versions of Magento or even on the latest one using. You can use either GTM or GTAG to implement the full structure.

 

I have found a great detailed resource using GTM (https://www.scommerce-mage.com/blog/how-to-setup-magento-2-ga4google-analytics-4.html) to set it up. You can use it for your GTM implementation. The guide is very in-depth and insightful. I also saw that they have modules available for both of these implementations. 

Re: Google Analytics - Measurement ID

Hi achahinewiffa8,

 

The transition from Universal Analytics (UA) to Google Analytics 4 (GA4) involves several changes, including the use of Measurement ID instead of the Tracking ID. Here’s how you can implement the Measurement ID in Magento 2.3.5:

Steps to Implement GA4 Measurement ID in Magento 2.3.5

  1. Google Tag Manager (GTM) Integration:

    • Create a Google Tag Manager Account: If you don't have one, create a GTM account and container.
    • Add GTM Code to Magento: Go to your Magento Admin Panel -> Content -> Configuration -> Edit the theme you are using. In the HTML Head section, add your GTM container code.
    • Create a GA4 Configuration Tag: In GTM, create a new tag of type "GA4 Configuration" and enter your Measurement ID. This tag should be triggered on all pages.
    • Publish Your Container: Once the tag is set up, publish your GTM container.
  2. Direct Implementation:

    • If you prefer not to use GTM, you can directly implement the GA4 Measurement ID:
      • Edit Header Template: Access your Magento theme’s header template file (header.phtml) and add the GA4 global site tag (gtag.js) snippet provided by Google Analytics.
      • Insert the Measurement ID: Replace the placeholder in the snippet with your GA4 Measurement ID.
      • Deploy Changes: Save and deploy the changes in Magento.

Recommended Service

To ensure a smooth implementation and avoid any potential issues, consider using a professional service:

  • Setup of Google Analytics 4, GA4, Facebook Pixel, or Tag Manager Conversions: This service will help you correctly set up and configure your GA4 Measurement ID, ensuring accurate data tracking. You can find more details here.

By leveraging professional assistance, you can be confident that your tracking setup is accurate and optimized for capturing valuable data insights.

If you need more detailed assistance or specific guidance, feel free to reach out!

Best regards,
Weslly

Freelancer Especialista em Google Analytics, Tag Manager e L