Go Back

Implement Piwik manual goal conversion tracking with Piwik PRO Tag Manager

Author

Introduction to manual goal conversion tracking

Conversion tracking is the heart of web analytics. Even the most basic analysis is useless without it. Tracking goals to draw conclusions is why we have web analytics reports. Just looking through raw data and metrics without having any defined goals is pointless.

In Piwik you can configure your conversion goals in multiple ways:

Piwik goal configuration
Piwik goal configuration

In other words, a conversion goal is triggered when:

  • When a user visits a specific URL
  • When a user visits a page with a specific Page Title
  • When a user executes a specific Event
  • When a user Downloads a specific File
  • When a user clicks on a specific Link to an external website

But there is another way to configure a goal – manually.

Here is where you would choose the following option:

Piwik manual goal configuration
Piwik manual goal configuration

This allows you to insert a trackGoal() function wherever you want.

Free Comparison of 5 Enterprise-Ready Tag Management Systems

Get to know the 40 key differences between Google Tag Manager, Tealium, Adobe Dynamic Tag Management, Ensighten & Piwik PRO:

Download FREE Ebook

Use case scenario

Let’s say we are interested in tracking users who click on our Polish telephone number on the piwik.pro website. This means we want to collect information in our Visitor Log that specific user clicked on the number.

Piwik PRO Contact page
Piwik PRO Contact page

We have to implement this goal manually because there is no other way to set this automatically. Of course, this is a link, but it leads to the URL callto:+442033182881 which means it is not a static page where we could put our tracking code.

Piwik Configuration

To begin with we have to configure a Goal in our Piwik platform. To do this we go to the Manage Goals menu in the main menu (you can learn more about goals from our User Guide):

Creating New Goal in Piwik PRO
Creating New Goal in Piwik PRO

Then of course we have to Add a New Goal by clicking on:

The next step is the configuration of the goal itself. Firstly, we have to set a recognizable Goal Name (1), then choose the manually (2) option from the dropdown menu under Goal is triggered.

After that, depending on our expectation, we can set that goal to be converted one or more times during a session. We want to observe all the phone number clicks, so we select the Allow Goal to be converted more than once per visit (3) option:

Piwik goal configuration
Piwik goal configuration

Finally, after configuring our new goal, we just have to click on Add Goal.

The next very important step is to check what ID our new goal has. We will need this number to correctly configure goal tracking in Piwik PRO Tag Manager. After saving the goal we see the list of all our goals. Go to the bottom of the list and find the newly added goal:

Checking the goal ID
Checking the goal ID

We have our ID – in our case it is 24.

Piwik PRO Tag Manager – Tag configuration

So – we have configured our goal in Piwik (remember the ID) and now we have to help our website send Piwik the relevant information we hope to generate. To do this, we can use Piwik PRO Tag Manager for a smooth, easy experience that doesn’t involve our IT department and a lot of messy coding.

Firstly, we add a new tag:

Piwik PRO Tag Manager - adding a tag
Piwik PRO Tag Manager - adding a tag

Within the tag configuration we have couple of steps:

1. Set the Tag Name which will be easily recognizable

2. Choose the Asynchronous custom HTML tag option:

Tag configuration
Tag configuration

3. Now we have to insert the code which will provide Piwik with the correct information into the Tag HTML field:

Inserting custom Piwik code
Inserting custom Piwik code

Here you can copy the code which we are using – notice that we’ve used our goal ID (24). It is important to use your goal’s ID in order to make it work.

<script>
_paq.push(['trackGoal', 24]);
</script>

4 . Now the second most important part (after inserting the proper code). We have to correctly trigger this goal at the right moment. As we said at the beginning, we want to track Clicks on phone number link, so:

4.1. Set a Trigger Name which will be easy to identify.
4.2. Choose Click as the form of loading the tag.
4.3. Choose Click Url to identify right link on the page. Set the value to: equals callto:+442033182881. Why? Because our website doesn’t have any ID or classes on this HTML element, we have to distinguish this particular link via its href value.

Checking HTML of the element
Checking HTML of the element

4.4. To be sure that we are talking about Contact page we add the next condition Page Url with the value of: contains contact.

Configuring Trigger
Configuring Trigger

5. Click Save for the trigger and again Save for the whole tag.

Piwik report

Now the configuration is done, so it is time to track this new goal in our Piwik reports. For us the most useful place to track this goal is in the Visitor Log. We can easily distinguish all the visitors who have clicked on our phone number:

Visitor log in Piwik
Visitor log in Piwik

The goal is duplicated because the phone number was clicked twice – which only confirms the success of our Piwik goal configuration.

Free Comparison of 5 Enterprise-Ready Tag Management Systems

Get to know the 40 key differences between Google Tag Manager, Tealium, Adobe Dynamic Tag Management, Ensighten & Piwik PRO:

Download FREE Ebook

Author:

Szymon Grzesiak, Marketing Tech Lead

Experienced Performance marketing Specialist with tech knowledge.

See more posts of this author
Free Comparison of 5 Enterprise-Ready Tag Management Systems

Share