About the site inspector for Chrome

Analytics + Tag Manager

Needed permissions: owner, manage, edit & publish, edit or view

The Piwik PRO site inspector is an extension for Chrome that shows heatmaps, real-time sessions and other analytics data right on every page of your site. In this article, we’ll show you how to start collecting data for heatmaps, clickmaps and scrollmaps, add the extension and use the site inspector.

Site inspector for Chrome by Piwik PRO

Collect data for a heatmap and clickmap

First you need to add a custom tag with a code that will collect data about clicks on each page of your site. Clicks will appear as a heatmap and clickmap in the site inspector.

To add a tag for collecting data for a heatmap and clickmap, follow these steps:

  1. Here’s the code that you’ll use:
    (function () {
    var collectHeatmapClicks;collectHeatmapClicks=function(){"use strict";var e={460:function(e,t){t.default=function(){return{injectConfigForSiteInspector:function(){if(window.sevenTag){var e=window.sevenTag.configuration,t=document.createElement("script");t.id="ppas_container_configuration",t.setAttribute("data-appId",e.id),t.setAttribute("data-host",e.main_domain),document.head.appendChild(t)}},getElementPath:function(e,t){var r=(void 0===t?{}:t).blacklistedClasses,n=void 0===r?[]:r,a=function(e){var t=e;return n.forEach((function(e){t=t.replace(new RegExp(e,"g")," ").trim()})),t},o=function(e){for(var t,r=[],o=0,i=e[o];i&&i!==document&&i!==window&&"html"!==(t=i.tagName.toLowerCase());i=i.parentNode,o++){if(i.id){t="#"+i.id,r.push(t);break}if(Array.prototype.slice.call(i.parentNode.children).filter((function(e){return e.tagName.toLowerCase()===t})).length>1){var c=Array.prototype.slice.call(i.parentNode.children).indexOf(i)+1;c>0&&(t+=":nth-child("+c+")")}if("string"==typeof i.className&&i.className){var s=i.className.trim();n.length&&(s=a(s)),s=s.replace(/\s+/g,"."),t+="."+s}r.push(t)}return r.reverse().join(">")},i=[],c="";if(e.composedPath)c=o(e.composedPath());else{for(var s=e.target;null!==s.parentNode;)i.push(s),s=s.parentNode;i.push(window.document),c=o(i)}return c}}}}},t={};return function r(n){if(t[n])return t[n].exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(460)}().default;
      var heatmapCollector = collectHeatmapClicks();
      document.addEventListener('click', function(e) {
          'Heatmap events',
            { blacklistedClasses: [] },

    In this code, you can change the following parameters:

    • blacklistedClasses: [], // An array of regexps (e.g./class-name/ for strict string search) of CSS class names that will be filtered from the final path

    Note: This code saves clicks and clicked elements as custom events. Keep the event names as they are because the site inspector uses them to show the data.

    Note: This tag slightly delays page loading when a visitor clicks on elements that reload the page. It gives the tag time to send data to the tracker. The delay is less than one second.

  2. Go to Menu > Tag Manager.
  3. Navigate to Tags.
  4. Click Add new tag.
  5. Name the tag and choose the following tag type: Custom code (async) (Custom asynchronous tag).
  6. In Tag code, add the code from step 1.
    Site inspector for Chrome setup
  7. In Tag triggers, click Choose existing trigger to set up a trigger for your tag.
  8. Choose the following trigger: All page views.

    Note: You can also use a page view trigger that will fire the tag on specific pages.

  9. When you’re done, click OK.
  10. Click Save for the tag.
  11. Test your tag in debug mode.
  12. When you’re happy how the tag works, click Publish.

    Note: This tag will record a custom event each time a visitor clicks each element on your site. This will increase the number of actions on which we base our pricing.

    Note: This tag is also needed to authorize the site inspector when you use it for the first time.

Collect data for a scrollmap

To see data for a scrollmap in the site inspector, you need to add a custom event tag with a page scroll trigger for each scroll mark. The easiest way is to create four tags with 25%, 50%, 75% and 100% scroll marks, but you can use different marks.

When creating a custom event tag, you need to use the following framework because the site inspector will only then understand the data. That is:

  • Category: Heatmap events
  • Action: 25%, 50%, 75%, and 100%
  • Name: Leave it empty otherwise, data won’t be collected correctly.

We’ll show you how to set up a custom event tag for a 25% scroll mark, and you’ll be able to repeat these steps for other marks.

To set up the tag for a 25% scroll mark, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Click Add new tag.
  3. Name the tag and select the following type: Custom event.
  4. Click Next.
  5. Set Category as Heatmap events.
  6. Set Action as 25%.
    Custom event setup
  7. Leave Name empty.
  8. In Tag triggers, click Add new trigger.
  9. Name the trigger.
  10. In Event type, choose the following type: Page scroll.
    Site inspector for Chrome setup
  11. Click Next.
  12. In Amount of page scrolled, set the percentage as 25%.
    Site inspector for Chrome setup

    Tip: Percentage depth is the relative measure most commonly used for understanding the scroll depth. But if you want to use an absolute measure, you can change the percentage to pixels and record the scroll distance in pixels. This can be useful for comparing across devices where the relative percentage heights vary greatly.

  13. In Event conditions, optionally define conditions for the trigger. You can decide to fire the tag only on some pages.
  14. In Multiplicity, mark Fire tag once per page view. This is the best option to see how far people are scrolling on a page.
    Site inspector for Chrome setup
  15. When you’re done, click OK.
  16. Test your tag in debug mode.
  17. When you’re happy how the tag works, click Publish.

You can now repeat these steps to set up the 50%, 75%, and 100% marks. Remember to change the action to the 50%, 75%, and 100% and percentages in the trigger setup.

Tip: When setting up the 100% mark, you might need to use a bit lower mark to capture the end of the page. For example, 98% or 96%.

Install the site inspector in Chrome

After setting up data collection for heatmaps, clickmaps and scrollmaps, you can install the site inspector for Chrome.

To add the extension, follow these steps:

  1. Open our extension in your Chrome browser.
  2. Click Add to Chrome.
    Piwik PRO - Site inspector
  3. Confirm your installation.
  4. Pin the extension to see it on your site.
    Site inspector in Piwik PRO
  5. Authorize the extension.

    Note: To authorize the extension, you need to have access to Analytics and an owner, manage, edit & publish, edit or view permissions for this site.

How to use the site inspector in Chrome

Once the extension is installed, you can start using the site inspector in the Chrome browser. Now we’ll just give you a quick tour.

To use the site inspector, follow these steps:

  1. Open your site and navigate to the page you want to look at.
  2. Click on the extension icon in the browser’s menu and click on Piwik PRO – Site inspector.
  3. The site inspector will appear on the right side.
    Site inspector for Chrome by Piwik PRO

    Note: To see data in the site inspector, you need to have access to Analytics and an owner, manage, edit & publish, edit or view permissions for this site.

  4. Choose dates and click Load overlays.
  5. Turn on Heatmap, Clickmap or Scrollmap.
    Site inspector for Chrome by Piwik PRO

    Here’s what each map shows:

    • Heatmap: Shows where people clicked on this page. Intense warm colors show the most clicks. Pale cold colors the least clicks.
    • Clickmap: Shows the edges of the clicked elements. Hover over an element to see the number and percentage of clicks and the element ID.
    • Scrollmap: Shows how far visitors scrolled down this page. To see data for this scrollmap, you need to start collecting scroll data in Piwik PRO.

    Note: You can see all maps at the same time. Each time you change dates or a page, you need to click Load overlays to see data. Also load overlays again if the layout of elements changes after you scroll the page or interact with it.

  6. Available from 16.3.0 To see a tracker debugger with your ongoing session, click on the bug icon.
    Site inspector for Chrome by Piwik PRO
  7. To change settings, click on the setting wheel.
    Site inspector for Chrome by Piwik PRO

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center