Hi, I finally integrated Piwik with my application in order to provide some sort of analytics to my end users. I am not using the widgets, but instead I am running API calls behind the scene and then rendering the list of results to the view or (later) show some charts, too.
However, a basic feature that I want to support but can’t get it working yet, is the following:
I have content that user can submit to the application and then embed a widget in their web page. Every time this happens I track the following custom page view:
piwikTracker.trackPageView(‘event/embed/<?= $model->id ?>’);
Where model id is the content ID.
Now, what I want to get is a list of Referer Websites using API method Referers.getWebsites by segmenting it with a given pageTitle, for example “event/embed/100”.
The URL I am using is formatted as:
?module=API&method=Referers.getWebsites&idSite=1&segment=pageTitle==event/embed/{$id}&period={$period}&date={$interval}&format={$this->format}&filter_limit=50&token_auth={$this->token}
But for any reason I am getting empty results as soon as I add the segment part. So, at a glance seems I can’t get the desired output. If I don’t use the segment part then I get the list of global referer websites.
What I am doing wrong?