matomo-org / tag-manager

Free Open Source Matomo Tag Manager - A simple way to manage and maintain all of your (third-party) tags on your website.
https://matomo.org
GNU General Public License v3.0
168 stars 57 forks source link

[Enhancement] Add Custom Dimension tracking as an option for Matomo Analytics Tags #806

Open 9joshua opened 1 week ago

9joshua commented 1 week ago

The only way to track Custom Dimensions on demand via the Matomo Tag Manager is to use a Custom HTML Tag. The default Custom Dimension field in the Matomo Configuration Variable is not suitable/practical for setting trigger-based Custom Dimensions.

We should be able to add Custom Dimension tracking as a 'Tracking Type' option for Matomo Analytics Tags. For example... image

The options for this tracking type would be Custom Dimension ID and value - where the value can accept a variable.

AltamashShaikh commented 1 week ago

@9joshua We already have this option available with Matomo Configuration variable to set the custom dimensions, do you mean having an additional tag which will have similar UI to set the custom dimensions ?

Screenshot from 2024-06-24 07-17-02

9joshua commented 1 week ago

@AltamashShaikh Yes, I think it would be good to have a Custom Dimension that can be tied to a trigger - for example, if a visitor views a certain subset of pages or clicks a contact button.

The Custom Dimension option in the Matomo Configuration Variable cannot be tied to a specific trigger and is more or less hard-coded for every visitor.

chopsol commented 1 week ago

I support this issue. Dimensions at the configuration level are bound to all Pageviews as well as to all Events. This leads to problematic evaluations, since events appear with action dimensions, although you may only need these dimensions for a page view. A single assignment of a Dimension values on Pageview and a different on Events would be very helpful. In contrast to the first screenshot of @9joshua, I would recommend the Dimensions as a supplement for a page view or an event. The integration should be identical as in the case of the configuration.

AltamashShaikh commented 1 week ago

@9joshua @chopsol I have marked this issue "for prioritisation", our product team will check and schedule this accordingly.

@chopsol You mean having the option to set custom dimensions in Matomo pageview/EventTag right ??

chopsol commented 1 week ago

@AltamashShaikh correct. Like this: tag-dimension