I’ve enabled analytics on my WebGL project, but I’m not getting any data on my dashboard. This error pops up periodically in the browser console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdp.cloud.unity3d.com/v1/events. (Reason: CORS request did not succeed).
This looks like a problem on the Unity server’s side, how do I fix that? I have CORS enabled on my server that’s hosting my project.
We do not support CORS yet. Are you sending custom events from WebGL? If so, you would need to call Analytics.FlushEvents() after every call, a known issue.
not perform web requests over to https://cdp.cloud.unity3d.com/ from http://www.game.com/ at all ; which I don’t believe is the case either - since the way the analytics backend works is by performing requests over to that API endpoint?
That makes me think, since neither of those scenarios are appropriate, surely we must support CORS on the analytics backend?
To the OP - please describe how you are using Analytics on WebGL. We have many users using Analytics on their server-hosted WebGL games. Are you using Custom Events?
Hello. I have the same problem.
After some testing, I found out that exactly 10 minutes after starting my application, Unity Analytics tries to send some request to ‘https://operate-sdk-telemetry.unity3d.com/v1/record’. This happens even when I don’t perform actions in my application.
Please help, what could be wrong?
I have the adblocker turned off, I’m testing my application from inkcognito mode. From other browsers and devices the problem remains. Events are shown in the console and displayed in the dashboard.