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.83k stars 2.64k forks source link

Segmentation API reference: indicate when the segment is provided by a non-core plugin, and by which #12647

Open simivar opened 6 years ago

simivar commented 6 years ago

I need to get from Matomo through API all data corresponding to sent e-mail marketing to check which messages has been opened. I wanted to use campaignName segment which is listed here under "Campaign" but I get response with an error: {"result":"error","message":"Segment 'campaignName' is not a supported segment."}

URL to which I send my request: http://domain.com/analysis/index.php?module=API&method=Live.getLastVisitsDetails&idSite=3&period=day&date=2018-03-26&format=JSON&token_auth=token_auth&segment=visitorId==cdf756b32c95a41f;campaignName==email-nov2011

Any suggestions? Why I get that the segment is not supported when API says it is?

mattab commented 6 years ago

Hi @simivar the feature is available via this plugin: https://plugins.matomo.org/MarketingCampaignsReporting in core otherwise you have to combine two other segments (referrer type is campaign and referrer name is X)

Edit; maybe we should mark segments that are provided by an optional plugin more clearly on the Segmentation Reference page? https://developer.matomo.org/api-reference/reporting-api-segmentation

simivar commented 6 years ago

@mattab Thank you for such fast reply.

Edit; maybe we should mark segments that are provided by an optional plugin more clearly on the Segmentation Reference page?

It would be highly appreciated. In the future there would be no such questions as this one and it can save time of other developers using Matomo.