A question about Netlify Analitics

I am considering about usingNetlify Analytics.
I am worried about whether it will be counted properly even with REST API access.
How does Netlify perform access analysis? (using javascript or Netlify’s original infrastructure?)

I consider that it is impossible if Netlify use JS when the page is loaded and , otherwise it is possible to count if access analysis is performed on the Netlify infrastructure (network) side.

I’m glad if anyone use netlify-analytics can tell me.

The Analytics data comes from the CDN nodes serving the HTTP response. If there is an HTTP request to a CDN node, it will be counted.

If people are clicking links in a single page application (SPA) which redraws the page in the browser using javascript and there is no new HTTP request to the site (perhaps because the pages are preloaded), those types of actions are not counted at this time. Analytics is a counting real HTTP requests only.

If there are other questions, we’re happy to answer.

1 Like

Thank you a lot for your reply.

The Analytics data comes from the CDN nodes serving the HTTP response. If there is an HTTP request to a CDN node, it will be counted.

That means, if we send an HTTP request each time as REST API, it will be counted correctly. Is it right?

For example, when we have an in-house web system outside of Netlify and call HTTP(s) requests from the system without any identification tokens such as cookies(e.g. curl command) to get resources hosted on Netlify like a.html, b.json, c.pdf and d.png, is it possible to count access to these a/b/c/d resources?

As Netlify Analytics require extra money, we would like to know what it is accurately before paying.

Hi, @kurage0807. This would work for HTML files, which is how page counting is tracked. The “page view” is a loading of the page HTML.

The images, PDFs, and other media files would not count as page views though. This is only because they are not HTML files though.

If there are other questions about this, please let us know.

1 Like

Dear luke, Thank you for your quick and kind reply.
I can understand that media files such as images,pdfs wouldn’t be counted.
I would like to confirm if it isn’t be counted even with the JSON file.

Hi, @kurage0807, it is only for .html or .htm file extensions. Note, files like found in a directory like asset/index.html will be served for an HTTP request to https://example.com/asset/. This would count as a pageview in Analytics, even if the request comes from a script, bot, or other software (it doesn’t need to be a web browsers).

However, if the URL was https://example.com/asset/index.json, this would not count as a pageview. Only URLs which serve an HTML file are counted (and they must have the .html or .htm filename extension.

1 Like

Hi @luke, thank for your replying many times.
I understand that it is not able to count if the pag is .json file.
Now I would like to
prepare html page and start to try Netlify analiytics.

hi @kurage0807 - you can sign up for analytics through the netlify dashboard when you are ready:

1 Like