Using Tag Manager to track goals with revenue

Before I added the Tag Manager, I tracked goals via my JavaScript like this:

const goalID = 1
const amount = 100;
_paq.push(['trackGoal', goalID, amount]);

Now that I I’ve replaced the Matomo snippet with MTM’s, I’m trying to replace this with something like:

window._mtm.push({'event' : 'conversion', 'goalID': goalID, 'conversionAmount': amount})

For this to work, I added to my MTM setup:

  • Two ‘Data-Layer’ variables in MTM: conversionAmount and conversionID
  • A trigger called ‘conversion’
  • A tag with ‘Goal’ as ‘Tracking Type’ and {{conversionID}} as the ‘Goal ID’.

So far, this seems to work in Preview mode! But how can I pass the conversion amount as the goal’s revenue to Matomo? The docs only seem to mention how to do that for generic events.