Goal tracking with Google Tag Manager

Hi,

I created some goals in Matomo Analytics, based on events. I used Google Tag Manager to create these events. For this, I used the “Matomo Analytics (formerly Piwik)” tag template from trackify-info. I filled in all the right information. The event category in GTM matches the event category in Matomo for every goal. However, goals are not being tracked. I’m 100% sure the goals have been completed by users in the meantime. Is there anything I’m overlooking here? I know I haven’t provided that much information about my setup. If this is needed, I can make some screenshots. They will be in Dutch, though.

Thanks in advance for your help!

Hi @SjoerdvdBro
First question: Does the event arrive well in you Matomo? Just check in the Visitors > Visits Log:

Hi Philippe,

Thanks for your response. I don’t see the event in the visits log. I only see pageviews.

Hi @SjoerdvdBro
As the event is not sent to Matomo, it cannot transforms it as a goal…
Check on the tracked page if there is no error in the browser console log, if there is no HTTP error in the browser network console, if the event request is well sent, if the last version of the container is deployed (and called). Try also do debug the MTM container:
https://developer.matomo.org/guides/tagmanager/debugging

Hi Philippe,

Thanks again! I’m actually not using MTM, but Google Tag Manager. This should also work, right?

Hi @SjoerdvdBro
This can work… If the event is sent to Matomo!
Fix the GTM code for the event to be sent.
Another way, if you don’t want to use an event Matomo side, is to send the goal directly via HTTP request (idgoal + optional revenue params):
https://developer.matomo.org/api-reference/tracking-api

Hi,

See the images below for how I made the event in GTM (in Dutch though). This should normally work, right?

Hi @SjoerdvdBro
This seems good (I have never used GA), BUT the Event Action is mandatory (and then is missing…)

Hi Philippe,

Ah okay, I will try if it works if I add this. Thanks!

1 Like