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

Content-Tracking over Tracking-api do not shown in Dashboard #12178

Open TomTheRock opened 7 years ago

TomTheRock commented 7 years ago

Hi There,

we use the current v. 3.2.0.

When we send a content event over the HTTP Tracking-api it seems that this do not work correct as described in the documentation:

We try to use the "Optional Content Tracking info" as in docu described you can use c_i with c_n & optional c_p:

To track a content impression set c_n and optionally c_p and c_t. To track a content interaction set c_i and c_n and optionally c_p and c_t. To map an interaction to an impression make sure to set the same value for c_n and c_p. It is recommended to set a value for c_p.

Data_Stastics in Dashboard used: Actions => "Actions: Content Name"

1. Case - Do not shown in Dashboard ("Actions: Content Name"), but i seems to written in the statistics but stay hidden /piwik.php?c_i=Click&c_n=Show-Merchant-details&c_p=Merchant-888&token_auth=xxx&idsite=2&rec=1&url=xxx&_id=lp9vquilmubfofa5&rand=714&apiv=1&h=15&m=xxxx&cip=xxxxxx&action_name=Local%2FClick&debug=1

Debug:

DEBUG: Executing Piwik\Plugins\Actions\Tracker\ActionsRequestProcessor::afterRequestProcessed()...
DEBUG: idaction_content_interaction = Click
DEBUG: idaction_content_name = Show-Merchant-details
DEBUG: idaction_content_piece = Merchant-888
DEBUG: Executing Piwik\Plugins\Goals\Tracker\GoalsRequestProcessor::afterRequestProcessed()...

2. Case after the first we trigger the same api call without c_i=Click (interaction), then in the dasboard it shows the data in the stastics with 1 impression and 2 interactions /piwik.php?c_n=Show-Merchant-details&c_p=Merchant-888&token_auth=xxx&idsite=2&rec=1&url=xxx&_id=lp9vquilmubfofa5&rand=714&apiv=1&h=15&m=xxxx&cip=xxxxxx&action_name=Local%2FClick&debug=1

Debug:

DEBUG: Executing Piwik\Plugins\Actions\Tracker\ActionsRequestProcessor::afterRequestProcessed()...
DEBUG: idaction_content_name = Show-Merchant-details
DEBUG: idaction_content_piece = Merchant-888
DEBUG: Executing Piwik\Plugins\Goals\Tracker\GoalsRequestProcessor::afterRequestProcessed()...

So maybe it did not described correct in the docu or the api/stastics is bugged from the Dashboard.

Best Regards Tom

mattab commented 7 years ago

Hi @TomTheRock Can you please explain, what you get VS what you expected to get instead? It's not clear to me what is the problem

TomTheRock commented 7 years ago

Simplyfied: When you use 3 parameters to track the action content it do not work: &c_i=Click&c_n=Show-Merchant-details&c_p=Merchant-888 without "c_i" it work &c_n=Show-Merchant-details&c_p=Merchant-888

trilobit-gmbh commented 6 years ago

Hi, we see the same problem: content tracking is working (we can see the incoming data in the visitor log), but there is no content data shown in the dashboard.

Thanks to the analysis of TomTheRock I could reproduce the behavoir: With URL parameter "c_i" no data is shown in widget bildschirmfoto vom 2017-11-24 11-39-16 Without URL parameter "c_i" data is shown in widget as expected bildschirmfoto vom 2017-11-24 11-39-36

As content tracking is managed by piwik.js which appends the c_i-Parameter we currently can not show tracked content data to our customers.

Unfortunately we are not able to patch the piwik.js as it is a managed PIWIK instance by a service provider.

Best Regards Ingo

tsteur commented 6 years ago

c_i means an interaction happened. But the interaction will be counted only if you first track an impression. This means you first need to track the same request without c_i so it will be counted as an impression. As soon as someone interacts with it, track the request with c_i. Then it should appear. Hope it helps.

trilobit-gmbh commented 6 years ago

Thanks for the hint.

After adjusting the tracking calls of _paq.push accordingly (first trackPageView, than trackAllContentImpressions) we now see impressions and actions, too, in the reports.

I think the documentation for content tracking should be extended to help avoiding this pitfall.

Best regards Ingo