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.93k stars 2.66k forks source link

Custom Data Import (dimension widening) #6613

Open mattab opened 10 years ago

mattab commented 10 years ago

The goal of this issue is to implement a new feature in Piwik that will let you import a custom data file (eg. CSV format) that contains extra information about either your users, your content and your products. When importing this data you tell Piwik how to match it to your people and content and then Piwik will automatically let you use the Custom Data for Segments, or display it in the UI (eg. Visitor Log), and more!

This feature is similar to Google Analytics Custom Data Import feature: https://support.google.com/analytics/answer/3191417 (which used to be called Dimension Widening)

Types of data you can import

  1. User data (log_visit) — import user metadata, such as a loyalty rating or lifetime customer value, and use these values with segmentation.
  2. Content data (log_action) — group content by importing content metadata, such as author, date published, and article category.
  3. Product Data (log_conversion_item) — gain better merchandising insights by importing product metadata, such as size, color, style, or other product-related dimensions.
  4. Campaign Data — use campaign tracking IDs and import ad campaign-related dimensions, such as source, medium.

Inspired from GA because their way just makes sense.

Workflow

I prepare a data file in CSV format.

Here is a file example:

userId, LifeTimeValue, Industry
clientid1, 500, IT
clientid2, 5, NGO
clientid5, 100, Farming
client765, 222, IT

Then as a Piwik Admin user or Super User:

Proposed steps / TBD

DB Schema:

Notes

Feel free to post your feedback in a comment!

mattab commented 9 years ago

Related to powerful new feature: Custom Dimensions #9129

dgregory94 commented 7 years ago

I was looking into this feature to be able to have a lookup for data that comes in from my websites. If I know that code XYX is really, "Bob's Burgers", and I want to create reports with Bob's Burgers instead of XYX. Would this feature be something that I could use or is there any other functionality that could solve this problem?

mattab commented 7 years ago

Yes, sounds like you need this feature. But it's not developed yet unfortunately. it would be great to have. In the meantime you can set as "Custom Dimension" the real value you need and then use Custom Dimensions reports to see the reports: https://piwik.org/docs/custom-dimensions/ You may also find custom reports interesting: https://piwik.org/docs/custom-reports/

peterbo commented 6 years ago

Now, with CustomDimensions, this feature would be even more useful to be implemented:

For an initial version, perhaps it makes sense to restrict data import to the following types, because these are in my opinion the most valuable ones for CRM/cross platform use cases:

1) Import CustomDimension(s) (visit(or) scope) for userID or visitorID 2) Import Offline Conversion(s) (respectively Conversions from another platform / caller conversions, etc.) for userID or visitorID

In many cases it would make sense to introduce another scope for customDimensions: visitor scope (proposal here: https://github.com/matomo-org/plugin-CustomDimensions/issues/38)