App reviews, troubleshooting, and recommendations
Hi. Is it possible to use Google analytics within my shopify embedded app?
I have tried so many solutions and nothing seems to work. E.g.
https://www.npmjs.com/package/react-ga
https://github.com/Shopify/quilt/blob/main/packages/react-google-analytics/README.md
To me, it seems because the parent domain is different than my embedded app domain (public app is inside an iframe on shopify admin), it doesn't work, probably due to browser security issues.
If I go directly to my public app URL with the shopify origin parameter present, and fire an event on load, it does register in Google Analytics.
But, because of the way embedded apps work, they (after about 2 secs) forceably redirect back to https://[mystore].myshopify.com/admin/apps/[my-public-app]
No events or page views are registered from this point onwards.
No console errors are being logged. The functions to track are 100% being called as I added debugging logs inside them.
Thanks
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024