msgbyte / tianji

Tianji: Insight into everything, Website Analytics + Uptime Monitor + Server Status. not only another GA alternatives
https://tianji.msgbyte.com/
Apache License 2.0
1.61k stars 93 forks source link

Tracking code won't work with Ghost CMS? #123

Closed zarevskaya closed 3 weeks ago

zarevskaya commented 3 weeks ago

Hello,

I am trying to get Tianji working with Ghost CMS. I have no return data for visits.

When I click on a page on my website, I see this, error 204:

Screenshot_20241031_110707

Information is received, but nothing is displayed in Tianji.

Hany hint? Thanks in advance!

moonrailgun commented 3 weeks ago

can you provide more context?

for example a chrome devtool logs? or maybe you can provide your website then i can check it?

zarevskaya commented 3 weeks ago

Solved, it was a cors issue... Thanks for this cool app! I love it ;)

moonrailgun commented 3 weeks ago

well. how can this cors can resolve? i think i already added cors middleware

zarevskaya commented 3 weeks ago

I'm using Cosmos Server.

There is an option to set CORS origin, like that:

Screenshot_20241101_000238

Now, that work fine.

moonrailgun commented 3 weeks ago

okay, looks you are wrap tianji service with a gateway.

and this gateway disables cors by default for security reasons.

zarevskaya commented 3 weeks ago

That's correct. Thanks for the support.