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
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024