How to measure the performance of a newsletter (or any email) with Matomo

To be able to grow your business, it is crucial to track all your marketing efforts. This includes all newsletters and emails that you share with people outside of your business. Otherwise, you won’t be able to know which of your daily efforts are yielding results.

Are you wondering if it is possible to track the performance of an emailing campaign in Matomo (Piwik) efficiently? Would you like to know if it is technically easy? No worries, here is a “How to” tutorial showing you how easily you can track an emailing in Matomo properly.

Different tracking levels for different needs

There are many things that you may be interested to track, for example:

  1. How many users opened your email
  2. How many users interacted with the links in your email
  3. How many users interacted on your website through your email

Let’s have a look at each of these levels.

Step 1 – Tracking email and newsletter openings in Matomo

Tracking email openings requires to add an HTML code to your newsletter. It works through what we call a tracking pixel, a tiny image of 1×1 that is transparent so the user will not be able to see it.
In order to install it, here is an example of what this code looks like:

<img src="" style="border:0;” alt="" />

The Matomo tracking pixel explained

The above URL is composed of the following URL parameters which are part of our Tracking API:

  • idsite: Corresponds to the ID of the website you would like to track.
  • rec: You need to have rec=1 in order for the request to be actually recorded.
  • bots: Set it to 1 to include all the connections made to this request, bots included.
  • url: corresponds to the URL you would like to display in Matomo every time the email is opened.
  • action_name: This is the page name you would like to be tracked when the email is opened.
  • _rcn: The name you would like to give to your campaign.
  • _rck: The keyword you may like to use in order to summarize the content of your newsletter.

You may have noticed some special characters here such as “%20”, “%2F”. That’s because the URL is encoded. We strongly recommend you to do so in order for your tracking not to break. Many tools are available on the web in order to encode your URLs such as

If you would like to access the previous tracking code easily, keep in mind that you can always find the tracking code generator within the “Matomo admin panel → Tracking code”:

You can find more information about it on our guide at: How do I track how many users open and read my newsletter emails (using a pixel / beacon)?

As a result, the information will be pushed as following for any user who opens your email:

To not bias your regular page views on your website with newsletter openings, we recommend tracking newsletter openings into a new website.

Tracking even more data: the user ID example

You can go deeper in your URL tracking by inserting other parameters such as the user id if you have this information within your emailing database. One of the main benefit of tracking the User ID is to connect data across multiple devices and browsers for a given user.

You only need to add the following parameter &uid=XXX where XXX equals the dynamic value of the user ID:

Make sure that UID from your emailing provider is the same as the one used on your website in order for your data to be consistent.

Important note: some email providers are loading email messages by default which results in an opening even if the user did not actually open the email.

Step 2 – Measure the clicks within your emailing

Tracking clicks within an email lets you know with which content readers interacted the most. We recommend tracking all links in all your emails as a campaign, whether it is a newsletter, a custom support email, an email invoice, etc. You might be surprised to see which of your emails lead to conversions and if they don’t, try to tweak those emails, so they might in the future.

Tracking clicks This works thanks to URL campaign tracking. In order to perform this action, you will need to add Matomo URL parameters to all your existing link URLs:

  • Website URL: for example “”.
  • Campaign name: for example “pk_campaign=emailing”. Represents the name you would like to give to your campaign.
  • Campaign keyword: for example “pk_keyword=name-of-your-article”. Represents the name you would like to give to your content.
  • Campaign source: for example “pk_source=newsletter”. Represents the name of the referrer.
  • Campaign medium: for example “pk_medium=email”. Represents the type of referrer you are using.
  • Campaign content: for example “pk_content=title”. Represents the type of content.

You can find more information about campaign url tracking in our “Tracking marketing campaigns with Matomo” guide.

Here is a sample showing you how you can differentiate some links in a newsletter, all pointing to the same URL:

Once you have added these URL parameters to each of your link, Matomo will clearly indicate the referrer of this specific campaign when a user clicks on a link in the newsletter and visits your website.

Important note: if you do not track your campaigns, it will result in a bad interpretation of your data within Matomo as you will get webmail services or direct entries as referrer instead of your newsletter campaign.

Step 3 – Measure emailing performances on your website

Thanks to Matomo URL campaign parameters, you can now clearly identify the traffic brought through your emailing. You can now specifically isolate users who come from emails by creating a segment:

Once done, you can either have a look at each user specifically through the visitor log report or analyze it as a whole within the rest of the reports.

You can even measure your return on investment directly if goals have been defined. In order to know more about how to track goals within Matomo.

Note: for more information, see also our FAQ How do I track how many users open and read my newsletter emails (using a pixel / beacon)?

Did you like this article?

If you enjoyed reading this article, do not hesitate to share it around you. Moreover, if there are any topics you would like to write us about in particular, just drop us an email and we will be more than happy to write about it.

Share this post

Share on facebook
Share on twitter
Share on linkedin
Share on print
Share on email