I have a Gatsby site sourcing from Shopify, and I’m having a hard time getting the Acquisition Conversions working.
My guess is that when they go to the Checkout page, since it’s on Shopify’s domain, it sees that as Direct traffic.
My current configuration is:
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "...",
head: true,
anonymize: false,
respectDNT: false,
allowLinker: true,
},
},
I just added that allowLinker
in to test today. Is there anything else I’m missing? I’m not too familiar with analytics I’m just a humble javascript farmer.
Thank you
2
Answers
Google Analytics recently changed their API to version 4 and upon other things, they changed the way the tracking identifier is set to the page. I suppose that the plugins will migrate soon to that changes but in the meantime, this is the only plugin available that works with that new API version:
gatsby-plugin-google-gtag
. So:All the above parameters are optional, just omit them and replace the
GA-TRACKING_ID
for your real identifier.I’m not sure if you ever solved it @cYberSport91, but in the year 2021 AD I am trying to do the same. This is what I found:
Place this snippet in your gatsby-ssr.js or gatsby-browser.js:
Source: Gatsby Git Issues
(Still waiting to confirm with my client whether this solution works)