If you want to know how many readers open your newsletter, you can add an image beacon (also called pixel tracking) to your email’s HTML and track email openings with Piwik PRO.
The image beacon is a 1-pixel-by-1-pixel transparent image that is pasted into the email’s HTML. When the image loads, Piwik PRO logs information about the visitor (your reader) and their session.
To track the email openings, follow these steps:
- This is the code you need to modify, to work for your website:
<img style="border: 0;" src="https://example.piwik.pro/piwik.php?idsite=00000000-0000-0000-0000-000000000000&rec=1&bots=1&url=https%3A%2F%2Fexample.com%2Femail-opened%2Fnewsletter_XYZ&action_name=Email%20opened&_rcn=internal%20email%20name&_rck=newsletter_XYZ">
https://example.piwik.pro: change to the name of your account.
idsite=00000000-0000-0000-0000-000000000000: change to your website ID.
- In this line of code, you can change a few things:
https%3A%2F%2Fexample.com%2Femail-opened%2Fnewsletter_XYZis an encoded version of the page URL that you’ll see in reports after the email is opened. The decoded version looks like this:
https://example.com/email-opened/newsletter_XYZ. You can change elements in this code so that it shows your domain and the proper name of your newsletter.
action_name=is the name of tracked action. Again this
Email%20openedis an encoded version of
Email opened. You can change that to a different action name.
_rcn=is the campaign name used in the campaign report. Again this
internal%20email%20nameis an encoded version of
internal email name. You can change that to a different campaign name.
_rckis the campaign keyword used in the campaign report. You can change this
newsletter_XYZto a different campaign keyword.
- Once you have the modified code, add it to the newsletter’s HTML.
- Now, when somebody opens your newsletter, you will see a new page titled
Email openedin the page title report under Menu > Analytics > Pages > Page titles.
In addition to tracking email openings, you can also track how many readers clicked on the links in the newsletter. For that, you’ll need to add campaign parameters to the destination URL. To learn more about tracking campaigns read this chapter in our guide Analytics for Beginners.