Is it possible to use API Goals.getItemsCategory and limit the query to just one category?


#1

Is it possible to use API Goals.getItemsCategory and limit the query to just one category? I have an ecommerce site that will have potentially thousands of different categories so querying the API will be extremely taxing. However, I only need the data for one category at a time. Is there a way to increase performance by only getting the traffic data associated with one category at a time (like a WHERE category=‘example category name’ query filter)?

The same goes for products. The site will hold many thousands of products, and ideally I’d like to be able to query the API to get traffic data for on certain products at a time. Like, if I could pass in a list of SKU’s to the API query and only get the traffic data back on those products it would be perfect.

Is this possible to do in piwik out of the box? And if not, what would I need to do to implement such a feature myself? Additionally is this something PRO-support could help me build?

Thanks piwik!


(Matthieu Aubry) #2

Yes it’s possible. Use the parameter


&label=

(and URL encode the parameter value)

see the API reference documentation at: Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3


#3

Matt,

Thank you this is perfect!

Also, thank you for this amazing product.