Goal Tracking

What is Goal Tracking?

The Goals feature within Matomo helps track your website performance against business objectives. These include objectives such as, lead generation, online sales and increased brand exposure.

On every website, there are specific actions visitors take which contribute to objectives. These actions will vary, but could be as simple as visiting a specific page, or submitting an online form. As these goals vary between sites, you will need to manually configure them to collect useful data.

What Makes a Good Goal?

Goals are potentially the most important part of your analytics tracking. Well-defined goals can help you to understand things like, the type of visitors converting on your website objectives, the marketing channels those visitors are coming from, and why some visitors aren’t converting. Goals data can help you improve your website in under-performing areas so you can convert more visits to leads. They can also help you identify the most beneficial marketing channels to focus on. Not only should you check goal performance often, you should also ensure you select useful goals.

Example Use Cases for Goal Tracking

To help you get a better idea of the kinds of actions that make great goals, you’ll find a few example use cases below.

Objective: Lead Generation / Goal: Newsletter Form Submissions

Lead Generation is one of the most popular aims for many major websites. Whatever your marketing focus, you will likely want to build an email marketing list. The most common way to build an email list is through subscription forms on your website. Therefore, to track your lead generation objective, you might want to set up goal tracking on your subscription forms. This will allow you to monitor the conversion rate for newsletter subscription forms over time.

Objective: Online Sales / Goal: Product Added to Wishlist

If you want to track online sales, the best method is using Matomo’s Ecommerce Tracking features. However, there can often be lots of goals before a sale, which can bring people further in their path to making a purchase. For example, if your ecommerce platform offers it, you may want to track Add to Wishlist actions. If you have a really simple single product website, you may even utilise goal tracking on your order confirmation page to get a sales conversion rate for your website. However, for actual sales you are better off using the Ecommerce functionality offered by Matomo.

Objective: Increasing Brand Exposure / Goal: Blog Actions (Comments/Social Shares)

Increasing brand exposure may be one of the harder examples to quantify, but that doesn’t mean it’s impossible. For example, you could set up a goal that tracks when people view a key piece of your content, like your company’s mission statement, or about page. You could also go further by tracking engagement with your site. For example, by tracking how many people click social media sharing buttons or comment on your company’s blog articles. These are all great indicators of positive brand exposure, and as such are perfect candidates for Goal tracking.

How to set up Goals

To set up a goal, visit the Goals section in Matomo and then click over to Manage Goals. This page will show any existing goals you have along with a large green button to Add A New Goal. Clicking this button will bring up the Update Goal view where you can add all of the required details. If you can’t access this, you need to make sure that you have Write permissions.

Matomo Goal Creator

You should select a descriptive goal name that is easy to reference, for example New Job Application. It may also be useful to set up a specific naming convention if you will have many similar goals. For example, you might use a pattern such as, Click – Affiliate Link and Click – Partner Site, so you can easily find and reference similar goals. In the example above, you can tell at a glance that both Goals relate to link clicks on your site, as well as further detail on exactly what was clicked. You can also add a short description below the name field to help remember the more specific details or context of the goal.

Goal Triggers

There are many actions that can trigger a Goal, however all triggers are set up in one of two ways. The first is by using automatic built-in triggers which you can select while the default when visitors option is active. Alternatively, you can set goals to trigger manually. This requires you to add custom javascript, which is fired on your website when certain Goal conditions are met.

Automatic triggers are the simplest method for setting up Goals. There are several of these methods you can use without having to add any additional code to your website. You simply select from the automatic triggers shown on screen:

  • Visit a given URL (page or group of pages)
  • Visit a given Page Title
  • Send an event
  • Download a file
  • Click on a Link to an external website
  • Stay for a certain amount of time

Goal Trigger Editor

Each of the above methods will require you to define specific action that is required to fire the trigger for your goal. When using Visit a given URL (page or group of pages) as an example, you can select from the following options via the dropdown menu, then define your specific filters in the text box that follows:

  • Contains – This method triggers the goal when a visitor visits a page where the URL contains what you type in the text box. This option is especially useful when you want to match a range of options with a similar theme, such as all contact pages on your website. For example, typing contact in the text box would make the Goal fire if a user visited either of the following pages on your site:

  • Is Exactly – This method allows you to get really specific so the goal only fires on the exact URL that you enter, for example https://example.com/contact/submitted/ which might be a page shown once somebody has sent a message through a contact form.

  • Matches The Expression – Matching by expression is the most complex method. However, it also allows for the most advanced targeting options. It utilises something called regular expressions, or regEx for short, which can be difficult to understand when you first encounter it. If you are unfamiliar with regular expressions, we highly recommend you learn about regex before using it, and test your RegEx patterns extensively. The patterns you create would look a little something like this (.)\/contact\/(.) which in this instance would match any page containing /contact/ in the URL, such as https://example.com/contact/

All matching types based on the text patterns described above are followed by a checkbox so you can decide if you would like your trigger to be case sensitive. With case sensitivity turned on, a trigger set to check when users Visit a given Page Title which exactly matches the trigger, Contact Us, would not match a page title of CONTACT US due to the use of all uppercase letters.

How to Manually Trigger Goals in Matomo with JavaScript

Generally, you would only use manual triggering for a goal if it is not possible through one of the standard options. To manually configure your goals, you need to update your website or app so it calls some custom JavaScript. The most basic implementation looks a little something like this:

// Log a Conversion for Goal 1
window._paq = window._paq || [];
window._paq.push(['trackGoal', 1]);

The code above works by telling Matomo you want to push data into the platform _paq.push([ ]); and then trackGoal defines the type of data being sent. From there, Matomo recognises the unique Goal ID set in the second numeric variable and records the relevant conversion statistics. You can find your Goal IDs for manual configuration in the first column of the table shown on the Manage Goals section, after you have finished configuring your goals within the Matomo dashboard.

Matomo Goal ID

Manual triggering of goal conversions for Matomo is covered in more depth – including how to link a dynamic revenue amount – within the developer documentation.

Allow Multiple Goal Conversions (or Not)

The next step of the Goal configuration flow allows you to set whether you Allow multiple conversions per visit or not. By default, each Goal can only be counted once per visit. This is useful for things like newsletter subscription confirmation pages where the user can only register for your newsletter once, but they may load the confirmation page multiple times.

The reverse scenario of counting a specific conversion multiple times is useful for actions where you care about cumulative results. For example, if users can leave multiple product reviews or apply for multiple jobs, and you want to track each time this happens, then you would update this setting to Allow Goal to be converted more than once per visit.

Tracking Goal Revenue (optional)

Not every goal will lead to revenue, but many will, whether directly or indirectly. The next field in the standard Goal creation flow is to set an optional Goal Revenue figure. This doesn’t have to be an exact value, or even require that the goal be attached to a sale, but it can help you evaluate the return on your marketing efforts.

For example, if you know that on average you sell one $1,000 service for every one hundred leads, then averaged out, each lead is equal to about $10. Therefore, you could set the Goal Revenue to $10 as the logic follows that by the time you’ve reached your hundredth lead you will likely have made at least one $1,000 sale.

Premium Features for Matomo Goals

Funnel Settings

If you have access to the premium Funnels feature, either through a Matomo Cloud Subscription, or the plugins Marketplace, you will be able to configure funnel tracking next. This is useful for tracking users’ conversion paths before completing a goal. Importantly it also helps you understand where users, that don’t convert the goal, are getting stuck, so you can improve that step to improve your goal conversions.

An example of this can be found on the Matomo Demo site where Job Applications are tracked:

  1. Job board – This is the beginning of the funnel where somebody views all available jobs.
  2. Job view – The next step of the funnel is viewing any specific jobs of interest.
  3. New Job Application – The final Goal of this funnel is reaching the job application form.

Job Application Funnel

While your Goal metrics track how many people have applied for a job in total, you may also want to know what percentage of people reached each stage of your conversion funnel. Using the example above, you may see you are getting lots of visitors to the Job board and Job view stage, but for some reason they don’t click through to the application page. This would indicate there is potentially an issue with the job details or the final conversion step. For more information on this feature check out the Matomo Funnels user guide.

Multi Channel Conversion Attribution

If you have the Multi Channel Conversion Attribution plugin or a Matomo Cloud Subscription you will also see a simple checkbox option on the Goal update page. This premium feature collects more data on all of the contributing lead sources that have led to the completion of your Goal Funnel. It can keep track of users even if they leave your site and come back through another channel. For more information on the data that is collected by this feature, check out the full guide on Multi Channel Conversion Attribution.

Some Common Goals and How to Create Them

Newsletter Lead Form Subscriptions

If you are collecting email leads for a marketing newsletter, this is a prime candidate for a Goal. The simplest way to create a goal in this case would be to create a thank you page on your website that visitors are redirected to after completing a lead form. Once you have created your thank you page, complete the following steps:

  1. Visit the Goals section of Matomo and click the Manage Goals menu item.
  2. Click the big green Add A New Goal button to load the Update Goal page.
  3. Add a descriptive name such as Signed up to Newsletter and potentially a description.

Update Goal - Newsletter

  1. Configure your Goal is triggered settings by updating the dropdown to when visitors and the bullet selection to Visit a given URL (page or group of pages).
  2. Update the where the URL dropdown to contains and then add your page path to the pattern text box. For example, if your newsletter thank you page is at https://example.com/newsletter/thank-you then the path would be /newsletter/thank-you as shown in the image below.

Goal Trigger URL

  1. On this Goal you would not allow multiple conversions per visit as someone can only become a subscriber once, no matter how many forms they fill out. So you can leave the remainder of settings and just hit the big green Add Goal button to publish your new goal.

Promotional PDF Downloads

Often companies will offer promotional PDF downloads, for example, a company whitepaper, a downloadable case study, or rates sheet. While you can automatically track downloads with Matomo, you may want to track specific documents central to your sales funnel as Goals. The steps for this are as follows:

  1. Visit the Goals section of Matomo and click the Manage Goals menu item.
  2. Click the big green Add A New Goal button to load the Update Goal page.
  3. Add a descriptive name such as Downloaded Company Brochure and potentially a short description.
    Brochure Download Goal
  4. Configure your Goal is triggered settings by updating the dropdown to when visitors and the bullet selection to Download a file.
  5. Update the where the filename dropdown to contains and then add your filename to the pattern text box. For example, if your uploaded file can be found at https://example.com/files/brochure.pdf then the path would be /files/brochure.pdf as shown in the image below.
    Matomo Filename Goal Trigger
  6. On this Goal you would not allow multiple conversions per visit as you are likely only interested in the fact that they have downloaded it at least once. So you can leave the remainder of settings and just hit the big green Add Goal button to publish your new goal.

Social Media Share

If social media engagement is an objective for your website, then you may want to track when people share your blog content. In this case, there is no standardised way to track people clicking social media buttons as there are so many different types. Your first step here would be to create an event that is fired whenever people use social media buttons on your site. For the rest of this example, we’ll be assuming you’ve created an Event with the following attributes:

  • Event Category: Social Media
  • Event Action: Share
  • Event Name: {Social Media Sitename}

You can click here to learn how to set up events with Matomo.

Once you have created the custom Social Media Share event as described above, you would continue to create the Goal tracking as follows:

  1. Visit the Goals section of Matomo and click the Manage Goals menu item.
  2. Click the big green Add A New Goal button to load the Update Goal page.
  3. Add a descriptive name such as Clicked Social Share and potentially a short description.
    Social Media Goal
  4. Configure your Goal is triggered settings by updating the dropdown to when visitors and the bullet selection to Send an event.
  5. Update the where the Event Category dropdown to contains, and then add your Event Action to the Pattern text box. Following from the example mentioned above, the action would be Share as seen below.
    Matomo Event Goal
  6. With social media shares, if you are interested in people sharing multiple blog posts or sharing to multiple networks, you would set the Allow multiple conversions per visit option to Allow Goal to be converted more than once per visit.
  7. As you don’t need to record any revenue associated with this goal, you can skip the next setting and just hit the big green Add Goal button to publish your new goal.

Reviewing and Managing Your Goals

If you need to update one of your existing Goals, within the Goals section of Matomo, click to view the Manage Goals section. You should see a table of all goals configured on your website along with a summary of their configuration. You will need Write permission to view the page.

Matomo Goal Manager

To edit any of your goals, simply click on the square pencil icon Edit Icon in the Edit Column and you’ll be presented with a similar screen to the one used to create goals. Make any required edits by following the Goal Creation steps shown above, and then hit the big green Update Goal button to confirm your changes.

How to Analyse Goal Tracking Data

Once you’ve started collecting Goals data you will want to spend some time reviewing it. You can do this by visiting the Goals section of the Matomo dashboard. This section shows a summary of all Goals data collected through the site.

Historical Goal Data

Within the first section, you will notice an Evolution over the period graph, which is useful for discovering trends in your Goal completions over time. If you use the Matomo Annotations feature, you will also see those entries plotted along the bottom of the graph, so you can see what might have caused any significant changes to your Goal conversion numbers.

Historical Goal Data

By default, you will see the number of conversions plotted in the graph. For more options, you can hover over the line chart icon Line Chart Icon at the top left of the graph. This will provide more metrics to help you drill down into the relationship between the different goals, revenue statistics, and conversion rates.

The most important metric for your goals is usually the conversion rate. It allows you to compare whether the website is converting better or not. When you only look at the absolute number of conversions instead, you don’t see the full picture.

For example, if one week, your website gets double the amount of visits, this would generally be a good thing. However, if you don’t get any more conversions, your conversion rate will have dropped, which actually represents worse performance towards your goals. Instead, you would want to see the number of conversions go up in line with the number of visits, which would maintain an almost consistent conversion rate, as shown below.

Goal Conversion History

Close tracking of the conversion rate can help you ensure you aren’t wasting opportunities. While more conversions are always good, tracking the conversion rate as well can help you discover if traffic to your website is reaching its full potential. You may also want to segment your users and view conversion rate for different segments.

Comparing Goal Metrics Over Time

You can enable multiple metrics at the same time by clicking on the metrics icon Line Chart Icon at the top left of the Evolution Graph. In the example graph below, you can see that the number of clicks reported for two partner websites started increasing at the same time, but one reached much higher levels.

Historical Goal Comparison

Without knowing the full context in the example image, it is hard to say for sure why more people are clicking on Liveaboard links over Agoda links. However, it might suggest the content recommending Liveaboard is more engaging. Or, it could simply be that there are less opportunities to click Agoda links on the website. As always with analytics; the underlying data will help reveal underlying trends, but you will likely need to correlate it back to your knowledge of your website and business activities to draw meaning from the results.

You may also have noticed in the graph above there are four green icons in the bottom left of the graph, which provide further options for working with the data set. In order, these are:

  • Change period (Calendar Icon Calendar Icon) – Select whether you would like data plotted by days, weeks, months, or years.
  • Export this data in other formats (Export Icon Export Icon) – Available formats are: CSV, XML, PHP, RSS, TSV, JSON, and HTML
  • Export as Image (Image Icon Image Icon) – This can be useful for sharing reports with clients or managers.
  • View notes for this date range (Annotation Icon Annotation Icon) – This brings up relevant annotations in the selected reporting period.

Goal Summaries

Below the Evolution graph you should see a series of sparkline summary cards containing a line chart, alongside these are conversion numbers and rates for your goals. The first card provides a combined summary of your goal conversion data within the currently selected date range. These statistics are useful to get a general feel of the marketing performance of your website. Generally speaking the higher these numbers are, the better your website is doing.

Goal Sparkline Summaries

Underneath the top sparkline summary card, you will find a further summary card for each of the goals on your site so you can review each individually. You can see the number of conversions and conversion rates for each goal on this page.

If you would like to review any of the goals in more detail, simply click on the goal title and it will take you to a dedicated page for that goal with more detailed graphs and data.

Job Application Goal

Goals Breakdown Reports

At the bottom of the Goals Overview page, you will see a list of goals reports alongside a table. Each of these reports summarises Goal data by various reporting criteria. These reports help you understand the conditions that lead to goal completions on your website.

Goals by Referrers

The Goals by Referrers report can help you identify the traffic sources that lead to goal completions. When your website receives traffic from a variety of sources, some traffic will inevitably be more qualified than the rest. The reports within this section break down the sources of visitors which are most beneficial to your website goals.

Channel Type Report

The channel report is useful for analysing the types of traffic, e.g. search or website referrals, that are most likely to complete a goal on your website. As an example, you might expect that traffic from Social Networks would complete a goal based on clicking social media links the most. This report can help confirm or deny your suspicions so you can adjust your marketing plans appropriately.

Search Engines Report

This report shows you which search engines send traffic that complete goals on your website. As an example, you might notice visitors from DuckDuckGo, a privacy-focused search engine, rarely sign up to your newsletter. However, these same visitors often complete the goal of clicking on your blog’s RSS links. This could suggest your blog is a better medium for keeping in touch with these users instead of an email newsletter.

Keywords Report

The keywords report attempts to identify as many keywords as possible that visitors have used to reach your site and complete your goals. As an example, you might notice visitors searching for keywords including “report” are more likely to opt-in to your newsletter. This would suggest that offering reports as an incentive to opt-in is a beneficial strategy for your website.

Websites Report

This report can help you identify which third party websites bring in qualified traffic. For example, imagine you are advertising job listings on multiple sites. However, only visitors from one site complete your New Job Application goal. In this case, you may want to investigate expanding your relationship with that site over the others. Continuing this example, you might also discover another job site leads to goal completions, but you aren’t directly advertising on it. In this case, you might want to see if they offer advanced job promotion features.

Campaigns (Enabled via Matomo Campaigns Extension)

If you are using the cloud version of Matomo, or if you have the Marketing Campaigns plugin, you can also review goals by Campaign; Name, Keyword, Source, Medium and Content. These dimensions are useful if you advertise through other channels such as email newsletters, paid ads, affiliates, etc.

Goal Engagement

This section is useful for tracking how long it takes for people to complete the goals on your website. As an example, if you were running a lead generation site, the Visits to Conversion report could show people tend to sign up on their third visit. Based on this, you might experiment with adding a popup subscription form to your site that shows on peoples’ first or second visits. You can then track if this results in more goal completions with less visits.

You might also notice in the Days to Conversion report, the majority of visitors complete your goals several days after their first visit. This could suggest people are coming in through multiple channels. Knowing this could help inform your multi-channel conversion attribution strategy.

Goals by User location

The next section provides data based on where and how visitors access your website.

Country, Continent, Region and City reports

These reports break down goal completions based on a visitors location. This can be useful, for example, if your site features marketing consent popups for visitors in certain areas, such as in Europe to address GDPR. In this case, the Continent report can help you understand the impact that may be having on your goal conversions.

Alternatively, the Country report might show that lots of people complete your goals in English speaking countries, but not in others, even though you have a high number of visitors. This could suggest that it would be useful to offer translations for non-English speaking markets.

Devices: Type, Model & Brand Reports

Analysing goal completions by device can help you identify potential technical issues with your site. For example, if you were to notice that nobody was completing your newsletter subscription form from a mobile device, you might want to run further tests to confirm that your optin form is fully visible and functioning on mobile devices.

Goals by User attribute

Visits by server time can help you identify the most popular times that people complete your goals. For an internationally-focused organisation, this could help inform you on the best time to run time-bound campaigns or publish new content.

Advanced Goal Tracking Methods

The Goals reporting section of Matomo is useful for creating reports on demand. However, goals are such an important focus, you will probably want to take a few additional steps to keep on top of your goal conversion rates.

  • Add a Goal Tracking Report widget to your dashboard so it is one of the first things you see every time you log in to Matomo.
  • Set up an email report to track your most important goals on a regular basis. At the very least it is recommended that you check on your core goals at least once per week.
  • Set up custom alerts to track core goals so you get notified if there is a dramatic decrease in their conversion rate. This can help you to identify potential issues, such as a broken sign up form.

A drop in your goal conversion rate is usually a sign that something isn’t going well on your site. Recent changes may have impacted your conversions, something may have broken, or your traffic sources might not be getting the right people in. All of these things can end up costing you money so it is important that you discover potential issues as early as you can.

Goal Tracking API & Developer Resources

For more advanced users, there are several API hooks available for Matomo Goals. Reference the developer documentation if you’d like to create, manage, update, or report on any Goals within your Matomo instance.