Form Tracking in Piwik PRO: GTM and Piwik Tag Manager

Table of Contents

Piwik pro form tracking requires some work on your end. Although some like GA4 offer automatic form tracking, we always recommend configuring form tracking manually. In piwik pro, we can do this either by using a GTM or Piwik pro tag manager.

This guide assumes you already have a working Piwik pro set up. If this not the case, check this guide to get you started.

Piwik pro form tracking using native Tag Manager

If you are using Piwik pro tag manager, then you need to head to your tag manager and add a new tag.

After naming your tag, you need to select ‘custom event’.

piwik pro form tracking event

Next, we need to add the event category, action, and name.

Add a Trigger to Piwik Pro tag

Finally, we can add the trigger. Piwik pro has a trigger that fires when a user submits a form called “Form submission“.

Piwik pro form submission trigger

Depending on what technology you use for building your forms (Ajax, jQuery…), using the form submission might not work. See this section for possible solutions.

If you want to differentiate between forms, you can add another condition like the page URL.

Let’s test our form and see if everything is working correctly.

Piwik pro form tracking using Google Tag Manager (GTM)

There is not much of a difference between using Piwik Pro and GTM. Unfortunately, there is no tag template for events, so we need to rely on HTML code.

<script type="text/javascript">
_paq.push(["trackEvent", "Contact", "Contact form submitted", "{{Form ID}}"]);
</script>

In our Google Tag Manager container, we will add a new GTM tag and paste the script.

Preview GTM tag

After adding the trigger, we will preview and see if everything is working as expected.

After submitting another form, the GTM tag is firing correctly. Let’s take a look at the debug view in Piwik pro to see if we can capture the event there as well.

As you can see, the event is received correctly by Piwik pro.

Final words on form tracking using Piwik Pro

If you used GTM before, then the process is very familiar to you. the one thing to pay attention to is what kind of trigger to use. You definitely don’t want to send a form submission event when in fact the user got a message error. This will inflate the number you will see on your dashboard, which makes it quite useless for you.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Go Further