All Collections
FAQ
How to use Google Analytics 4 in Front-Commerce
How to use Google Analytics 4 in Front-Commerce

In this article we will learn how you can use Google Analytics 4 in your Front-Commerce Project.

Paul avatar
Written by Paul
Updated over a week ago

Solution 1: Update Front-Commerce to >= 2.19.0

Since version 2.19.0 we support officially Google Analytics 4 🥳, you can have a look at our documentation to learn more.

Update your config/analytics with new plugins


Solution 2: Use Google Tag Manger

Google Tag Manager already supports Google Analytics 4, although with this method you will have to manually configure your e-commerce events, we follow the same spec as segment in the Front-Commerce core.


Solution 3: Override the Analytics module in your project

You can always duplicate the code from the latest Front-Commerce version and override the analytics module.

💡Remember to install the required analytics package:

npm install analytics
Did this answer your question?