Analytics is not tracking any data. How to troubleshoot?

In this thread we discuss:

  • Common issues in the implementation and configuration causing data not being tracked
  • Tips & tricks on how to troubleshoot and fix it

There may be a couple of reasons why data isn’t tracked.

1. There is no analytics data collected for the date range you are looking at.

Ensure you selected the right date range in the date picker including today.

Data in analytics is shown with up to 30 minutes delay, but you can check real-time sessions on your website by going to Tracker debugger (go to Menu → Analytics → Settings → Tracker debugger) to see if data is being collected.

See more about tracker debugger.

2. Piwik PRO tracking code wasn’t installed properly.

You can also check if all the tags are properly installed by appending ?stg_debug=1 to the URL of tracked website. Mentioned URL opens Tag Manager debug mode on the right hand side. If it is missing, follow the next steps.

Go to your website and view the source of the website (in Chrome: right click on the page → View page source). Search for the code that will look similar to:

<!-- Piwik PRO Tag Manager -->
<script type="text/javascript">(function(window,document,script,dataLayer,id){function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString()}document.cookie=a+"="+b+d+"; path=/"}var isStgDebug=(window.location.href.match("stg_debug")||window.document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?365:-1);window[dataLayer]=window[dataLayer]||[],window[dataLayer].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName(script)[0],tags=document.createElement(script),dl="dataLayer"!=dataLayer?"?dataLayer="+dataLayer:"";tags.async=!0,tags.src="//YOUR_INSTANCE.piwik.pro/containers/145bf313-72ef-479d-b2fd-ebe7e3a2a8f6.js"+dl,isStgDebug&&(tags.src=tags.src+"?stg_debug"),scripts.parentNode.insertBefore(tags,scripts);})(window,document,'script','dataLayer','145bf313-72ef-479d-b2fd-ebe7e3a2a8f6');</script>
<!-- / Piwik PRO Tag Manager -->

(where YOUR_INSTANCE will be replaced with the account name that you choose during sign up)

If you didn’t find the code, check this user guide: Install a tracking code.

3. Check if tracking library for analytics is loaded by the browser.

Open “Inspect” mode in your browser (in Chrome: right click on the page → Inspect), go to “Network” tab and refresh the page (CTRL+R on Windows or CMD+R on MacOS).

You will see network requests. In the search box enter “ppms.js” and see if you see a request to load the analytics tracking library as on the screenshot below:

In case you don’t see it, it means that the code isn’t loaded. There might be two reasons for that:

  • You didn’t install properly tracking tag (see point 1)
  • You changed the configuration of Piwik PRO tag in the Tag Manager and it isn’t firing. Ensure this tag is enabled and is fired on “All page views” trigger.

In case you see the “ppms.js” in red as blocked in the Inspector, check your ad blocker if it isn’t blocking loading this file.

4. You excluded your IP address or browser from being tracked.

Check the global settings (Menu → Administration → Platform → Global website settings) and website settings (Menu → Administration → Websites & apps → your website) for blacklisted IP addresses and/or browsers. This is how this section looks like when you do not have any IPs or browsers blacklisted: