There are advantages and specificities to each tracking method.

  • Advantages of Using Log Files over Javascript
    Log files are already available so it makes sense to make the most of this information. Log files contain search engine bot & spam bot information as well as static image/css information. Log files contain requests of users with adblockers (ghostery, adblock, adblock plus, privacy badger, etc.)
  • Advantages of Using the JavaScript Tracker over Log Analytics
    JS tracking is very customizable, it executes only once per page ensuring that the data is as accurate as possible, whereas log file analysis tends to “over-report” data. Javascript tracking is often easier to setup than log analytics.
    Using JavaScript Tracking or using the Tracking API directly also allows for the more advanced use cases such as using more accurate unique visitors metrics (if cookies are used), ability to use features such as Custom dimensions, Ecommerce tracking, Heatmaps, Session recordings, Media and Form analytics, etc.

Eventually we hope to improve the tracking of data so that it is possible to “merge” both techniques, use the JavaScript tracking by default, and “enrich” the data using log files (for visitors that did not execute the JavaScript or for parts of the website that do not support JS). You can learn more and cast your vote in this issue.

Previous FAQ: Differences using Log Analytics VS using JavaScript client