Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
We're currently working towards a Sanity (Next.js) & Shopify headless setup for a site. In theory, it'll all be served from the Sanity side and then when it comes to checkout, the user will be handed over to the Shopify side. The Shopify side will be hosted on a subdomain.
Just hoping for some advice about the best ways to track data / connect to GA4, please?
Hi,
Install and setup GA4 tracking in both Next.js and Shopify
Check cross-domain tracking set up
I had thought the same initially, however, after some research, it looks like there is the option of:
Have the same Gtag/data stream for both platforms as GA4, by default, will track over subdomains and domains if the Gtag is detected on both. It's suggested that this doesn't require any set up of cross-domain tracking.
Does that sound right to you? Would you recommend another way instead?
You can use GTM for both
That's great thanks for the help.
Would the Google & YT app be more accurate for data do you think?
Hello charlieim,
Google ads and YT app is accurate but not as accurate as Google Tag Manager.
Google Tag Manager has the feature of server-side tracking with first-party domain setup.
server-side tracking with a subdomain or first-party domain bypasses all kinds of cookie blockers, IOS 14 updates or browser restrictions.
Hey @Charlieim,
You can definitely manage everything with one GTM property on both sides.
If you are interested in a compliance app, check out Consentmo GDPR . Our solution supports headless stores and integrates smoothly into the checkout.
We are also TCF Compliant and Google CMP Certified, an recently introduced a new super cool native mobile view which can be tested for free.
If you need any help regarding compliance or have any additional questions our team would be more than happy to help 🙂
Cheers,
The Consentmo Team
Hello, I agree with @Small_Task_Help you can do your job with one GTM property on both sides. If the store has to be GDPR compliant, we provide a solution called Pandectes GDPR Compliance, which covers headless stores and is available inside the checkout journey.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024