Report this

What is the reason for this report?

using google analytics for an app

Posted on March 21, 2022

im trying to get analytics from a digitalocean app. i copy/pasted the code google gives me in my index.html page but i have this error : Cookie “_ga_myID” has been rejected for invalid domain. Cookie “_ga” has been rejected for invalid domain. the domain is like this : https://myapp-xxxxx.ondigitalocean.app/



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @,

I’m not sure what your APP is about but check this tutorial it says how you can add Google Analytics to a DigialOcean APP

https://www.digitalocean.com/community/tutorials/react-redux-beacon

Additionally, you can check this tutorial here, I think it will be quite useful for you:

https://www.digitalocean.com/community/tutorials/how-to-deploy-your-own-web-analytics-software-with-umami-on-digitalocean-s-app-platform

Hello,

I would suggest adding your own custom domain name rather than the one automatically generated by the App Platform.

You can follow the steps on how to do that here:

https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/

That way you will have full control over the domain name and would be able to verify it in your Google Analytics account.

If you do not have a domain name already, you can follow the steps here on how to get a free one:

Regards,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.