Content Tracking: nb_impressions not working on iframe widget


#1

I have some banners running through Content Tracking and show graphs in my CMS through using iframes. When requesting the stats, I can only load columns “visits” and “actions”. The admin of Piwik always shows “Impressions” for content. There seems to be a difference between actions and impressions. With alot of stats spam (bots), impressions seems to filter out duplicates.

So I have different stats in my CMS than on Piwik. In some cases a huge difference (10k).

When I try nb_impressions I get a Piwik error:


A fatal error occurred

The following error just broke Piwik (v2.8.1):

Call to a member function getColumns() on a non-object

in

/var/www/analytics.koopplein.nl/public/core/Plugin/Visualization.php line 274


Same thing happens on the Demo site:


https://demo.piwik.org/index.php?module=Widgetize&action=iframe&columns[]=nb_impressions&widget=1&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=7&period=day&date=today&disableLink=1&widget=1

When adding impressions as second column, no error occurs, but it will just not recognize the column. Same thing on the Demo site:


https://demo.piwik.org/index.php?module=Widgetize&action=iframe&columns[]=nb_actions&columns[]=nb_impressions&widget=1&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=7&period=day&date=today&disableLink=1&widget=1

Ofcourse in my case I also added the following param


&segment=contentName==Banner_783

but left that out in this case to show my problem.

Is this a bug?


(Matthieu Aubry) #2

I think this is a feature request to add nb_impressions and nb_interactions metrics to VisitsSummary - could you create an issue on Issues · matomo-org/piwik · GitHub ?


#3

Done:
https://github.com/piwik/piwik/issues/6504


#4

Hmm I managed to reproduce the same graph from the Piwik panel using the following:


index.php?module=Widgetize&
action=iframe&
columns[]=nb_impressions&
columns[]=nb_interactions&
widget=1&
moduleToWidgetize=CoreHome&
actionToWidgetize=getRowEvolutionGraph&
apiMethod=Contents.getContentNames&
label=Banner_319&
idSite=8&
period=day&
date=today&
disableLink=1&
widget=1&
filter_offset=0&
viewDataTable=graphEvolution&
token_auth=XXXXX

I came to these params by inspecting the JSON code params within Piwik. Hope this helps someone else!

Are these things documented somewhere?

I wonder if the feature request on my post above is still useful?