Your team reports in Matomo, not GA4. You want gallery clicks and adds next to your other events.
A Custom HTML tag in Google Tag Manager
Use this when the Matomo tracking code already runs, on your site or in GTM.
Send each moment as a Matomo event
- Set up the trigger. Create the idukki_ugc trigger and its variables, as in /help/gtm-route-idukki-events.
- Add a Custom HTML tag. Click Tags, then New. Choose Custom HTML and paste the code below.
- Attach the trigger. Set the idukki_ugc trigger as the firing trigger. Save.
- Test and publish. Preview, click a tile on your store, then publish.
<script>
window._paq = window._paq || [];
var ids = [].concat({{DLV - content_ids}} || []);
var args = ['trackEvent', 'Idukki UGC', String({{DLV - ugc_event}}), ids.join(',')];
var value = {{DLV - value}};
if (typeof value === 'number') args.push(value);
window._paq.push(args);
</script>Each moment arrives as category Idukki UGC. The action is the moment, such as add_to_cart. The name holds the post or product IDs.
Matomo Tag Manager reading the GTM dataLayer
Matomo Tag Manager can copy GTM dataLayer events into its own. Matomo added this in version 5.2.0-b3.
Read idukki_ugc in Matomo Tag Manager
- Turn on the sync. In the container settings, turn on Actively synchronise from the Google Tag Manager data layer.
- Add a variable. Create a Data Layer variable with the name ugc_event.
- Add a trigger. Create a Custom Event trigger with the event name idukki_ugc.
- Add the tag. Create a Matomo Analytics tag. Set Tracking Type to Event, and use the variable as the action.
Make an add to cart a Matomo goal
In Matomo, open Goals, then Manage Goals. Add a goal triggered by an event where the action is add_to_cart.
| Matomo field | Value from the widget |
|---|---|
| Event category | Idukki UGC with the GTM tag, or your choice in Matomo Tag Manager |
| Event action | gallery_view, post_click, post_open, product_click, video_play or add_to_cart |
| Event name | Post or product IDs |
| Event value | The add’s value, on add_to_cart only |
Events show under Behaviour, then Events in Matomo.
- Do I need Google Tag Manager for this?
- Yes, today. The idukki_ugc event lives in the GTM dataLayer.
- Does this cover video progress?
- No. Video quartiles go to GA4 only. The dataLayer carries the first play.


