Search code examples
htmlgoogle-analyticsmeta-tagsprefetch

Does html5 link prefetch affect Google Analytics?


Does the html5 link prefetch attribute cause a visit to be counted on the prefetched page in Google Analytics?

<link rel="prefetch" href="http://someurl.com/page.htm" />

This SO question about tracking prefetched AJAX content is similar but the <link> tag is a browser interpretation without any Javascript and it is implemented per browser.

I am developing sites with logical previous and next page content. The application is browsing sequentially through a website, training course or online brochure.


Solution

  • The prefetch only downloads the resources, but does not execute the code, or fire DOM events or so.

    Given Google Analytics depends on running JS, I don't expect it to be affected.

    Any server side analytics that track requests to the given resources will be affected though.