vercel / analytics

Privacy-friendly, real-time traffic insights
https://vercel.com/analytics
Mozilla Public License 2.0
422 stars 26 forks source link

Referrers panel seems to not be getting data #89

Closed bartvdbraak closed 1 year ago

bartvdbraak commented 1 year ago

I have implemented Vercel Web Analytics on my personal website (https://github.com/bartvdbraak/hellob.art)

However, I don't seem to be getting any referrer data for it. If I inspect the API calls being made, they look as follows:

curl 'https://hellob.art/_vercel/insights/view' \
  --data-raw '{"o":"https://hellob.art/?ref=github","sv":"0.1.2","sdkn":"@vercel/analytics","sdkv":"1.0.1","ts":1690662958930,"r":"https://github.com/"}' \
  --compressed

Even when I am coming from GitHub, which does populate the Referer header on my first document GET request:

curl 'https://hellob.art/?ref=github' \
  --compressed \
  -H 'Referer: https://github.com/'

What is Vercel using to gain these data points? Am I doing it wrong?

tobiaslins commented 1 year ago

Hey, can you still not see any referrers showing up? When its set (readable via document.referrer) you should see it. Let me know!

bartvdbraak commented 1 year ago

It does seem that that doesn't get populated when browsing with Firefox:

https://github.com/vercel/analytics/assets/3996360/1e46d542-461a-45b8-bccd-47d2c844f68c

tobiaslins commented 1 year ago

@bartvdbraak yeah, thats a privacy thing and a lot of pages/browsers don't pass any referrer anymore sadly. thats nothing we can do about this

bartvdbraak commented 1 year ago

Ah fair enough.. Is there any way I can implement this using query parameters in the links on other sites?

For example: https://hellob.art/?ref=github.com

Not sure if I can make the /view api call for Vercel Web Analytics interpret that correctly in any type of way.

tobiaslins commented 1 year ago

@bartvdbraak yes you could do that, although we're not showing ref or utm params yet, but this might come soon! (data will be stored already)

tamleapin commented 1 year ago

Hi @tobiaslins could we explore these stored data somewhere in the mean time? Thanks in advance.