Event tracking with external sites (webhooks)


I am setting up an e-commerce funnel in Matomo, and the last part of it redirects to a Mollie link and thank you page. Mollie can send me a webhook each time someone buys.

Is it possible with Tag Manager to configure Matomo to trigger an event each time the webhook is sent?

Thank you in advance

The Tag Manager is for building Javascript code to track events in a browser so it is an unlikely solution for the problem. Matomo can’t handle the webhook call directly but you could pretty easily create a proxy script to translate the webhook call to a doTrackEvent() call. See https://github.com/matomo-org/matomo-php-tracker/

Create a PHP (or other preferred language) page on a webserver and point the webhook at it. Then on that PHP page you can setup the php-tracker library and call the appropriate tracking calls, forwarding whatever parameters the webhook provided.

You could also do pretty much the same thing within Matomo by developing a plugin that will handle the webhook call. You would just expose an API method in your plugin and point the webhook at it.