Scroll Depth – Piwik

Scroll Depth is a Piwik plugin that tracks how far users are scrolling.
Percentage events are fired at the 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% and 100% scrolling down.

History

Original Scroll Depth for Google Analytics – Rob Flaherty
non-jQuery fork – Leigh McCulloch
Piwik Modifications – Robert Dian

Install

Download the file and upload it to your server.
Place the Scroll Depth code after your Piwik tracking code.

Supported modes

Mode: Events A

<script src="//piwik.rodi.sk/_extra_/gascrolldepth-rodi-c-004---min.js"></script>
<script>
  gascrolldepth.init({
    percentage: true,
    PiwikPercentageA: true
  });
</script>

Piwik Scroll Depth, Mode A


Mode: Events B

<script src="//piwik.rodi.sk/_extra_/gascrolldepth-rodi-c-004---min.js"></script>
<script>
  gascrolldepth.init({
    percentage: true,
    PiwikPercentageB: true
  });
</script>

Piwik Scroll Depth, Mode B


Mode: Goal

Create Goal for all percents (0% – 100%) in Goals -> Add a new Goal
with fields

Goal Name -> 0%
Goal is triggered -> manually
Allow multiple conversions per visit -> Allow Goal to be converted more than once per visit

Repeat for 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%.

In JavaScript code replace -Goal_ID- with proper Goal ID (PiwikGoal00: 1).

<script src="//piwik.rodi.sk/_extra_/gascrolldepth-rodi-c-004---min.js"></script>
<script>
  gascrolldepth.init({
    percentage: true,
    PiwikGoal: true,
    PiwikGoal00: -Goal_ID-,
    PiwikGoal10: -Goal_ID-,
    PiwikGoal20: -Goal_ID-,
    PiwikGoal30: -Goal_ID-,
    PiwikGoal40: -Goal_ID-,
    PiwikGoal50: -Goal_ID-,
    PiwikGoal60: -Goal_ID-,
    PiwikGoal70: -Goal_ID-,
    PiwikGoal80: -Goal_ID-,
    PiwikGoal90: -Goal_ID-,
    PiwikGoal100: -Goal_ID-
  });
</script>

Add a new Goal

Goals list

Visitor LogPiwik Scroll Depth, Mode Goal 003

Leave a Reply

Your email address will not be published. Required fields are marked *