Case Study - (Headless Magento 2)

Google Analytics 4 | Google Tag Manager | Looker Studio

About Client

Dermacare Direct is an online retailer of professional-grade skincare and beauty products. The company was founded in the UK in 2007 and has since expanded to serve customers in the United States and other countries.

The company specializes in clinical skincare, offering products that are formulated with high concentrations of active ingredients to address specific skin concerns, such as acne, aging, hyperpigmentation, and rosacea.

GA4 Experts Dermacare


The client needed the setting up of Google Analytics 4 (GA4) on thier Multi-Store Headless Magento 2 website. They also needed to migrate tags from the old standard Magento 2 GTM account to the new Headless GTM account. 

And, the requirement was to implement the complete e-Commerce tracking in Google Analytics 4 via Google Tag Manager.

Challenges faced

There were a few areas that needed to be handled carefully. 

For example, there were four domains – 2 Production websites and 2 Staging websites, and we had to make sure that data from each domain was being sent to their respective GA4 properties. 

Another problem was that the website was a Headless Magento set-up storefront built as a SPA (Single Page Application). 

Moreover, due to the custom storefront, there was no dataLayer implementation done. All of these had to be tackled at once.


To send data to different GA4 accounts, a possible solution was to have 4 different Google Tag Manager (GTM) containers installed on each domain. But that would have been a very time-consuming and complicated approach. Therefore, we decided to achieve this using the ‘Lookup Variable’ in GTM which was a much simpler solution.

Similarly, GA4 offers a capability to track ‘page_view’ changes in SPA and for other tags, we used the ‘History Change’ trigger. As for the dataLayer implementation, we coordinated with Development Team and provided them with detailed documentation and assistance for implementing the same.


With the changes made, data from all 4 domains – (2 Production websites and 2 Staging websites) was now accurately being sent to their respective GA4 property. Also, old tags were working fine with the ‘History Change’ updates to their trigger.

Lastly, with the Development Team’s correct dataLayer implementation, we were able to implement the E-Commerce tracking in GA4 successfully.


The project was not an easy one, with the Multi-Store Headless Magento 2 website having its own complexities. This was a tricky and sizeable project for our GA4 Experts team.

However, we were able to complete the project successfully, with accurate data being tracked for all domains.

The ECommerce reports started boosting results with correct tracking in place. Moreover, we were able to create funnels using GA4 Explorations reports to identify where the major drop-off is happening on the website and optimize the drop-off areas for better conversions.

Need help with your Google Analytics 4 implementation?