Tag Manager and Goals


I’m using MTM for the 1st time (was using manual JS until now).

Since the 1st tag I created has a “Goal” as Tracking type, what should I fill as a trigger on this goal creation form? Choices are user actions (I don’t want since the MTM will do the job), and manually with trackGoal (we miight consider MTM to be a manual call but I won’t use trackGoal).

Optional question: Is there a way to debug “Submit form” MTM trigger in preview mode (have time to see debug information before redirection)?

Thank you,

You have to create a trigger in the MTM, and then the tag will be run when the trigger is… triggered! :wink:
For example you can have a trigger on a specific click, or pageview… Or via a custom event…

For the debugging, I suggest you open the console (and check the option of keeping the previous logs). The MTM will be also verbose in the console…

I created the trigger correctly on the tag. My question is about the configuration of the goal, there is also a trigger.

I am not sure I understand your need.
Either you configure the goal in Matomo dashboard when a specific event /page view etc.occurs.
Or you configure the goal in MTM when a specific trigger has been triggered…

My case is exactly this one indeed : a MTM configured with a goal after a trigger has occured. Thus, since there is also a trigger to configure on the goal, it seems redondant to me. Should I configure the goal to be called manually?

No need to configure twice. Just use MTM if there is a case where standard events already received by Matomo do not trigger a goal (for example if the page must meet some condition to complete the goal, etc.)
The role of MTM is just replace standard Matomo Javascipt API… (there is also a way to send a goal achievement with standard Matomo Javascipt API: trackGoal( idGoal, [customRevenue]);

Yes ok that means the goal must be configured on a manual call, but I wasn’t sure since the help text speaks about this trackGoal() call.
But I just saw on the MTM side “The ID of the goal you want to track manually.” Which confirms.

Thank you

However, I can’t see any conversion on my goal, even if the trigger seem to launch the tag correctly, and I can see my goal ID configured.
What might be the cause?

Thank you

Can you have a look at the network activity?
Do you have goal number 27 configured in your Matomo goals dashboard? (I assume yes :wink: )

Yes I’ve got a Goal with id 27.
What should I look for on the network activity?

Look at the request that should be sent for that goal event…
It should be like: https://yourmatomo/matomo.php?idsite=1&rec=1&url=yourpageurl&_id=1234567890abcdef&rand=123456&apiv=1&idgoal=27...

Also did you succeed in tracking anything else with MTM? if not, with JavaScript API?

I just created a simple tag with a click trigger, and a test goal for that.

Yes I can see this request, returning a 204. And no, this simple test does not appear on my test goal either…

Maybe this is a problem of Do Not Track parameter… Try to turn this off:

No I don’t think so, because it’s currently in production and I got 0 conversion.
Also, that is no solution since I’d like to support this option, for obvious GDPR consideration.

Can you see any event of your navigation in the dashboard? Any page view, any other kind of event?

Yes I can clearly see my navigation details, even another Goal configured with a user trigger (displaying a specific page), and not with a Tag. I guess I’ll start to debug manually in piwik.php…

In the navigation dashboard, I can now see the Goal being triggered, even the one configured with the Tag. Even those from yesterday (while I couldn’t see it yesterday on the navigation dashboard)… So, I’m pretty confused.

However, I can’t see them on the Goal graph, for today or yesterday.

The archive cron is well executed every hour.

I finally managed to make it work. I got no real explanation but it was clearly not instantaneous to have the Goal graphs updated (and also to see the actions on the navigation dashboard for Tag triggers). I guess some cache and archive configuration also delayed this.

Thank you for your time and help!