@chrisprobst wrote:
We use Piwik cloud (innocraft.com) for analytics and have a custom dimension called channel_perm_id with scope Visit, it’s called dimension1 and is transmitted via JS Tracking API. Using the piwik admin panel we can verify that the dimension is set correctly and transmitted by each visitor.
Now we want to query based on this dimension1 aka channel_perm_id:
curl -i https://###.innocraft.cloud/index.php?segment=dimension1==2ceb64954d4e46f49bc6afa310cf92f&token_auth=###&format=xml&date=today&period=day&idSite=8&module=API&method=VisitsSummary.get
The important part is
segment=dimension1==2ceb64954d4e46f49bc6afa310cf92f
which causes this query to return an empty response:
<result> <nb_uniq_visitors>0</nb_uniq_visitors> <nb_users>0</nb_users> <nb_visits>0</nb_visits> <nb_actions>0</nb_actions> <nb_visits_converted>0</nb_visits_converted> <bounce_count>0</bounce_count> <sum_visit_length>0</sum_visit_length> <max_actions>0</max_actions> <bounce_rate>0%</bounce_rate> <nb_actions_per_visit>0</nb_actions_per_visit> <avg_time_on_site>0</avg_time_on_site> </result>
Without the segment parameter the response looks like:
<result> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_users>0</nb_users> <nb_visits>6</nb_visits> <nb_actions>0</nb_actions> <nb_visits_converted>0</nb_visits_converted> <bounce_count>6</bounce_count> <sum_visit_length>2469</sum_visit_length> <max_actions>0</max_actions> <bounce_rate>100%</bounce_rate> <nb_actions_per_visit>0</nb_actions_per_visit> <avg_time_on_site>412</avg_time_on_site> </result>
It looks like the custom dimension is somehow not aggregated in piwik.
But if we use the Live module (Live.getCounters instead of VisitsSummary.get), the query works fine.
So we think it has something to do with the scope maybe.
Any ideas are highly appreciated!
Posts: 1
Participants: 1