Page in the cache and Google Analytics. Work?

Good afternoon. There are rarely measured in the HTML page with the code GA and Y. the Metric. In the presence of a cache page in the browser the server does not send the page again, and gives a 304 code. If it works stably GA with pages from the cache? Do the tracking page view? Have you encountered any problems in this situation?
July 8th 19 at 11:28
1 answer
July 8th 19 at 11:30
Solution
The logic here is this:
The search robot G tried to go to your indexed page. Your server responded that the page will not changed. The robot went on.
GA code is not run, since the robot and the server exchange only the HTTP headers.
The browser cache there are also not work, because 304ый response is the server response and the client (web browser), it never comes.

If it is about the visitor:
He comes to the page. Server returns code 200, because for getting a 304 response, you need a special request, which browsers do not. Part of the data is loaded from the cache of the browser. Part is taken from the server. GA code is not cached, because you have simply no way to configure the caching, if it is not located on your server. GA works fine.

Find more questions by tags Google AnalyticsHTMLJavaScriptComputer networks