matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.9k stars 2.65k forks source link

Visitor scoped custom dimensions #21156

Open 9joshua opened 1 year ago

9joshua commented 1 year ago

Currently we have these custom dimension types:

This feature request is for the addition of Visitor-scoped custom dimensions. These dimensions would persist across visits by the same visitor as they would be an attribute of the visitor.

Use case

A visitor comes to a site for a total of 5 visits. In the final visit they purchase an item. Currently there is no way to exclude the 'abandoned cart' status of a visit for visitors who purchased an item in a later visit. A visitor-scoped custom dimension (for example purchased:true) could be assigned to the visitor and retroactively be applied to all previous visits. This custom dimension could then be used as a dimension or filter in custom reports or as a filter in segments.

The User ID is the only visitor-scoped attribute we currently have. But upon assigning a User ID, the current visit history and all previous visits from the visitor are severed from the new visitor created when the User ID is assigned. In other words, this is not an option for assigning an attribute to a visitor which can be used as a filter for previous visits.

michalkleiner commented 1 year ago

Hi @9joshua, this seems like it's possibly trying to solve a problem with the abandoned carts and subsequent purchases, is that the case? Just trying to understand if that's the motivation here or it's something else and perhaps trying to find a solution to a problem that's somewhere else/should be solved in some other way? Thanks for the clarification!

9joshua commented 1 year ago

@michalkleiner Tracking abandoned carts was the initial problem that spawned the idea, however I think having a visitor-scoped custom dimension would be useful for many other situations and seems to be the best way to solve this particular problem.

Other use cases:

If the User ID did not create a new visitor when it is assigned, it could be used for the same purpose. For example, a user ID of purchased_random# could retroactively indicate that all previous visits led to a purchase. These visitors could then be excluded in Custom Reports using a filter of userID starts with puchased_

9joshua commented 1 year ago

Another Cloud customer request for this. They need to retroactively change previously assigned visit-scoped custom dimensions. A visitor-scoped dimension would solve their issue.

9joshua commented 1 year ago

Another customer would like to create a custom report with the same data as a conversion export report which contains a look-back period. This is currently not possible but could be with visitor-scoped custom dimensions. The visitor could have their GCLID assigned as a visitor-scoped custom dimension and this could then be used as a dimension or filter in Custom Reports.

9joshua commented 10 months ago

Another customer needs the ability to report on a visitor's entire journey rather than their individual visits. As mentioned previously, visitor-scoped custom dimension could be used to filter the actions/behaviour of visitors across all their visits for visitor-based reports.

9joshua commented 8 months ago

A Cloud customer has many conversions from visitors who initially came to their site from various channels and then return via Google re-marketing ads. In this scenario conversions referrals are attributed to the re-marketing ads whereas the initial referrer is more important for marketing insights. Our multi-channel attribution feature does not provide enough fine-grain information for them about the conversion source. This could be solved by providing visitor-scoped custom dimensions to store initial referrer data where the referral source is not a re-marketing ad.