Analytics unique visitors very low

For some reason in my project,I have plenty of page views recorded, but the unique visitors number seems to be capped at 4 and I can’t quite figure out why that is.

Netlify instance affected: gatsby-lp.netlify.com.
It might be necessary to note that the frontend is broken when visited from the Netlify URL directly due to how we’re proxying the project in production on our servers. It’s weird, I know but it is out of my hands.

Edit://

I have written a custom wrapper ontop of the Analytics API to fetch data older than 30 days and it shows even higher pageviews but still only a couple of unique visitors as seen is the screenshots attached from our internal dashboard.

Screenshot 2020-01-22 at 12.11.22

@Kosai106 - this does seem odd! I am checking in with the team who work on analytics to see what might be happening here. We’ll respond here as soon as we know more, or if we need more information!

heya @Kosai106 - how is that page usually accessed? If it is proxy’d to, that would be expected, since we are only counting IP addresses for visitors.

I checked our internal logs, and it seems like you are - nearly all accesses come from a handful of IP addresses (6, plus a few who’ve now accessed it directly in the meantime probably as a result of this thread :)). That is not a recommended use mode for our CDN (see [Support Guide] What problems could occur when using Cloudflare in front of Netlify? for some details), but to answer your question: analytics is reporting what it intends and what our CDN sees around unique IP addresses visiting that site.

1 Like

Thanks for the reply, yeah it makes sense that the proxy is the blocker here. Sadly it’s the one part I can’t change due to how our infrastructure is set up.

Regardless, it’s not a big issue as it’s just for our internal dashboard anyway and more of a nice-to-have.

I’d suggest not proxying to us. It pretty much removes the capabilities of our CDN and is hard to configure in a reliable way.

Maybe you could talk more about your requirements, and we could help guide you to a better solution? Otherwise, analytics will never be useful for you and you’ll likely experience downtime and we cannot provide any kind of tech support for it. To be clear - it may work! But it will potentially fail catastrophically at some point and our only advice will be “don’t do that, please”.

So the usecase here is a little special, not going to lie.

We’re using Gatsby, both for our main www site, and then this project resides in a subfolder of that, in /lp/, however we need to have the proxy because this project generates pages for other subfolders of www such as /event/ and /webinar/.

Ideally the www project and this one should be merged into one codebase to make all of this simpler, but that has not been an option so far, thus we need our NGINX infra to proxy this Netlify URL to the correct one. I’ll admit I don’t entirely understand it either but it’s been the only way we could make it work so far. :man_shrugging:

You could proxy from us to the other service; that is well supported and works well. Then you get the benefits of our CDN, we’ll cache the things from $otherservice following the Cache-Control directives they set, and we’ll be able to provide tech support.

I understand that may not meet your business needs and we won’t make you do it. Just not recommended and we cannot provide tech support for it.

I see what you mean, however I believe this is out of my control but I’ll try to look into it and get back to you after I’ve spoken to our infrastructure team.

1 Like

sounds good, @kosai106. Keep us posted.