Question

I Make artificial page views with javascript on my website using javascript, because I need to track them later

piwikTracker.trackPageView('/lid/902095/website');

I need to be able to export how many times the above code was executed, i.e. how many times /lid/902095/website was visited, so that I can show some stats on my website, however I'm not sure what my query to the API should be, here is my attempt:

?module=API&method=Actions.getExitPageUrls&idSite=2&period=day&date=today&format=JSON&token_auth=anonymous&segment=pageUrl=@%2Flid%2F902095%2Fwebsite

It returns an error at this time "Error: The report 'VisitsSummary_CoreMetrics' was requested but it is not available at this stage. You may also disable the related plugin to avoid this error."

I don't see a plugin with that name in plugins section, my active plugins are "Actions, Dashbord, DoNotTrack, ExampleAPI, ExamplePlugin, Live, Login, Widgetize"

Not sure if this is the right query to send to the API or not, any help is appreciated.

Was it helpful?

Solution

If you want to track the visits use this api call

?module=API&method=VisitsSummary.getVisits&idSite=2&period=day&date=today&format=json&token_auth=anonymous

by default VisitsSummary plugin is provided

Piwik Web Essentials is a good book for reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top