My team regularly sends out emails internally using html templates.
Could Piwik be used to track email open rates and click-through rates of the links in the emails?
There wouldn’t be a main website we drive internal recipients to, just weekly email newsletters with links to various internal/external resources. So I'm not sure where Piwik should be installed.
We’re currently just using a white-pixel with a bit.ly url embedded in the template but it’s not the best solution, so I'm keen to find out if I could use Piwik for better and more in-depth tracking.
I have implemented the following example:
<img src="https://example.com/piwik/piwik.php?idsite=99999&rec=1&url=https%3A%2F%2Fexample.com%2Femailopened%2Finternal_email_name&bots=1&action_name=Email%20opened&_rcn=internal%20email%20name&e_c=internal%20email%20name&e_n=emailname&e_a=email%20opened" style="border:0;” alt="" />
This is a simple version that tracks the following items in Piwik:
sets Page URL to "/emailopened/internal_email_name"
sets Page Name to "Email opened"
sets campaign to "internal email name" )
sets event category to "internal email name" )
sets event name to "internal email name" )
sets event action to "internal email name" )
More options, like tracking Custom Dimension, uid (to set the User ID in case of cross-device tracking for personalised emails ) can be found here:
Tracking HTTP API: API Reference - Piwik Analytics - Developer Docs - v3
Hi, thanks very much @RMastop for this very useful tip.
I've tried testing it and it's tracking well but I have a couple of questions: