I am relatively new to matomo and wonder how I should use the Matomo tracking codes in case a voucher is added to the purchase.
I can imagine that I would use a custom dimension in order to track the voucher - but so far I am not aware of any best practices here so I would appreciate help / a link to a existing post.
I never used it but there is a feature for it: " discount (Optional) – Integer/Float/Boolean – Discount offered? Default to
false . Otherwise, you should include a numeric value."
So, no need to send a custom dimension.
But what I can see is that there is no dimension for it within the segment feature, so if you would like to create a segment to get people who are using a discount, this feature would need to be created in Github, done: https://github.com/matomo-org/matomo/issues/19661
Have a great day,