• Resolved df9517

    (@df9517)


    First of all – really good work that GA4 now works with your plugin. Well done!

    For now I am tracking both GA4 and UA analytics in parallell. I use my GA4 number in your plugin settings and included the UA tracking code myself in the html head. Everythings seems to be tracking well.

    Is this the way to go for tracking both?

    It would be nice if you could have an altarnative in the plugin settings to include both GA4 and UA number since your plugin works with both and Google recommends that you use both in parallell.

    Anyway – thanks for good work.

    • This topic was modified 3 years, 11 months ago by df9517.
    • This topic was modified 3 years, 11 months ago by df9517.
    • This topic was modified 3 years, 11 months ago by df9517.
    • This topic was modified 3 years, 11 months ago by df9517.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,
    Glad the updated version is working for you. There is a hook for modifying the generated snippet, which you could use to add the UA tracking ID to the Gtag code:

    
    add_filter( 'woocommerce_gtag_snippet', function( $gtag_snippet ) {
    	return preg_replace( '~</script>~', "gtag('config', 'UA-XXXXXX-13');\n</script>", $gtag_snippet );
    } );
    

    This should add the gtag('config'...); line to the end.

    Thread Starter df9517

    (@df9517)

    Thanks, I input your code in functions.php and it works!

    Hello, I have installed the plugin but it does not take the data, I clarify that it does not have the UA property of Google Analytics since it was created recently.

    How can I activate the improved e-commerce in Google Analytics 4?

    thanks for your help.

    Hi there,

    > ..I clarify that it does not have the UA property of Google Analytics since it was created recently…

    Google still provides the option to create Universal Analytics (UA) properties during set up, provided users toggle “Show Advanced Options”, and such property types continue working with the extension as described.

    To learn more about this, please refer to the “About Google Analytics 4” section at https://docs.woocommerce.com/document/google-analytics-integration/#google-analytics-4.

    Hi df9517,
    maybe you could answer my question. When I activate the Use Global Site Tag in the PlugIn: What Google Analytics Tracking ID do I need to use? The G-XXXXX or UA-XXXXX-X? I don’t know which one I have to use with the option “Use Global Site Tag”.
    Thanks, Martin

    Thread Starter df9517

    (@df9517)

    Obviously you can use any of them. The new thing is is that G-xxxxxxx works.

    Plugin Support Tseten a11n

    (@tibetanitech)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Successfully tracking both GA4 and UA analytics’ is closed to new replies.