Closed nicolasleroy closed 3 years ago
I have narrowed the issue down.
With Google AMP pages, when using the "amp-analytics" component, the request header Content-Type
is set to text/plain
. It's done on purpose as explained here: https://github.com/ampproject/amphtml/issues/22167
Umami returns a 500 error code when the request header Content-Type
is not set to application/json
.
Solution 1: I can write my own proxy to call the Umami API as intended. Solution 2: An adjustment can be made in Umami, in order to support the use case of tracking AMP pages ?
Thanks !
Hello, Thank you for Umami.
I'm trying to make it work on Google AMP pages, using the POST API and the guide at https://amp.dev/documentation/components/amp-analytics/
Here is the code I'm using:
This code unfortunately triggers the following error in the browser "Failed to load resource: the server responded with a status of 500 ()". On the server, there is nothing logged in the error log, so I'm left wondering.
Would someone have any clue ?
Thanks