There are two main ways to trigger a goal in Matomo, either automatically with built-in triggers or you can manually trigger goals with custom javascript. Generally, you would only use manual triggering for a goal if it is not possible through one of the automated goal options.

To manually configure your goals, you need to update your website or app so it calls some custom JavaScript when specific conditions are met. For example, you might fire the goal code when a form is submitted, or a user interacts with certain elements of your site. The most basic implementation of the goal code 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.