IFRAME Widgets -> Metriken ändern needs "anonymous" view?

Piwik 1.7.1

IFRAME Widgets -> Metriken ändern
needs “view”-permission of user “anonymous” for website-id x ???

Ich habe ein Custom-Cockpit erstellt mit Hilfe “IFRAME Widgets auth_token”.
Dabei haben wir das “Problem”:
dass man als nicht eingeloggter User,
die Metriken im Widget versuchen darf zu ändern,
aber beim darauf folgenden “AJAX Request”?..
das Widget kurz die Ladeanimation zeigt und sich sogleich in eine weisse Fläche verwandelt,
und keine Graphen mehr erscheinen.

Ist man hingegen eingeloggt in Piwik,
dann funktioniert dieses hinzufügen/entfernen von Metriken.

Versuch:
config.ini.php
[General]
enable_framet_settings=1
enable_framet_pages=1
bringt hierbei keine Lösung…

Piwik-Logging am Apache ergab folgendes:


x.x.x.x - - [19/Apr/2012:09:20:14 +0200] "GET /piwik/index.php?module=Widgetize&action=iframe&idSite=3&period=day&date=2012-04-18&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&columns[]=nb_visits,nb_pageviews,avg_time_on_site&token_auth=xxx HTTP/1.1" 200 11794 "http://A/tools/Piwik_API/test_iframe.html?&widget=VisitsSummary" "user-agent"
x.x.x.x - - [19/Apr/2012:09:20:18 +0200] "GET /piwik/index.php?module=Proxy&action=getCss&cb=0c0bf5afffe7ca2c9a79296ab671e5c6 HTTP/1.1" 200 13905 "http://A/piwik/index.php?module=Widgetize&action=iframe&idSite=3&period=day&date=2012-04-18&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&columns[]=nb_visits,nb_pageviews,avg_time_on_site&token_auth=xxx" "user-agent"
x.x.x.x - - [19/Apr/2012:09:20:18 +0200] "GET /piwik/index.php?module=Proxy&action=getJs&cb=0c0bf5afffe7ca2c9a79296ab671e5c6 HTTP/1.1" 200 163896 "http://A/piwik/index.php?module=Widgetize&action=iframe&idSite=3&period=day&date=2012-04-18&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&columns[]=nb_visits,nb_pageviews,avg_time_on_site&token_auth=xxx" "user-agent"

im Widget hinzügen einer Metric:


x.x.x.x - - [19/Apr/2012:09:20:42 +0200] "GET /piwik/index.php?viewDataTable=graphEvolution&module=VisitsSummary&action=getEvolutionGraph&date=2012-03-20%2C2012-04-18&columns=nb_visits%2Cnb_uniq_visitors%2Cavg_time_on_site%2Cnb_pageviews&filter_column=label&filter_column_recursive=label&idGoal=-1&filter_sort_order=desc&filter_offset=0&idSite=3&period=day&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&token_auth=xxx&controllerActionCalledWhenRequestSubTable=&rows=&filter_sort_column=nb_visits&disable_generic_filters=0 HTTP/1.1" 200 3599 "http://A/piwik/index.php?module=Widgetize&action=iframe&idSite=3&period=day&date=2012-04-18&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&columns[]=nb_visits,nb_pageviews,avg_time_on_site&token_auth=xxx" "user-agent"
x.x.x.x - - [19/Apr/2012:09:20:44 +0200] "GET /piwik/themes/default/images/logo.png HTTP/1.1" 200 11152 "http://A/piwik/index.php?module=Widgetize&action=iframe&idSite=3&period=day&date=2012-04-18&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&columns[]=nb_visits,nb_pageviews,avg_time_on_site&token_auth=xxx" "user-agent"

wenn man nun


..../piwik/index.php?viewDataTable=graphEvolution&module=VisitsSummary&action=getEvolutionGraph&date=2012-03-20%2C2012-04-18&columns=nb_visits%2Cnb_uniq_visitors%2Cavg_time_on_site%2Cnb_pageviews&filter_column=label&filter_column_recursive=label&idGoal=-1&filter_sort_order=desc&filter_offset=0&idSite=3&period=day&disableLink=1&show_footer=1&language=de&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&token_auth=xxx&controllerActionCalledWhenRequestSubTable=&rows=&filter_sort_column=nb_visits&disable_generic_filters=0

manuell im Browser aufruft, erhält man Meldung:
view Rechte für Webseiten-ID x sind von nöten

Ich habe extra einen Benutzer angelegt und für die entsprechende Seite VIEW Rechte gegeben, und dessen auth_token verwendet…
dennoch bekomme ich Meldung “view Rechte für Webseiten-ID x sei von nöten”

Dann habe ich testweise dem User “anoymous” das VIEW Recht für diese Website-ID gegeben und
voila es geht auf einmal…
OFFENBAR wird der mitgelieferte auth_token nicht verwendet, es wird von
/piwik/index.php?viewDataTable=
immer der User anonymous benutzt?!

Dem anonymous VIEW Rechte zu geben, beudetet, dass jeder darauf zugreifen kann.
Ist bei uns zwar per Apache nach aussen FORBIDDEN,
aber es wäre mir dennoch wohler, wenn
/piwik/index.php?viewDataTable=
den auth_token anwendet.
Ausserdem ist die Sache ohne eine Recherche, wie diese hier, recht ärgerlich, frustrierend,
zumindest für jemanden, der sich nicht derart intensive auseinandersetzt(en kann).

Betrachtungsweisen:

  1. its a feature not a bug… aber dann sollte man die Möglichkeit haben, das Icon “Metriken-Icon” auszublenden, so wie man es mit dem Footer tun kann…

  2. its a bug not a feature, dann Fehler eben beheben :wink:

Piwik 1.7.1

Hi,

I have the same probleme. Widgets use the auth_token for their requests but Piwik don’t allow the access.

Can anyone help?

Olivier

Anyone?

Olivier

Up!

Olivier

we users can not solve that problem…

by the way,
i have build a small frame,

step one: define the piwik-api request, send it and store the result in a DB as largeBLOB.
every request, with same key(request query as hashed value), gives the cached data,…
that improves performance a lot,

the second step is a XML analyzer, or even faster a simple string recognition logic…
so i get my data, per calendar week, the URLs or Segments, with their nb_hits or other metrics…

step three, converting that data in a strutur for the open-flash-chart…

last step, i use a simple HTML Page implementing the open-flash-chart that is calling my script for the graph definition and data, that calls my ServerScripts, my ServersData, not Piwik anymore(only for new, not yet cached, requests),
and Displays Graphs or Lists… outside Piwik…

the scripts in the steps are calling each other, top-down, no manual starting script by script… and working with actual datetimes… to determine the calender weeks, so week for week the new data is displayed too, automaticly

thats what the API is for…
and the problem of the widget auth_token remains in intranet realm…

maybe i can encourage readers to try such a way,
but they should be aware, to be fit in one programming language…its not clicky bunty,
i used python :slight_smile:

This is a known bug: Dashboard & Sparklines should work when embedded with token_auth · Issue #1353 · matomo-org/matomo · GitHub

Thakns for reporting, I have increased priority and we will fix it soon!

Nice :slight_smile:
Thx!

Olivier

Happy New Year! If you are still using Piwik and interested in the awesome new feature of “Creating a Custom Segment in Piwik and apply to reports in Real time!” we need YOUR help, with a little or big donation at: http://crowdfunding.piwik.org/custom-segments-editor/

This will allow to dynamically add or edit, a new set of rules for example “Show all visitors from USA and using Firefox and using Google”. This will be done via a simple to use interface. See screenshots and more info here: http://crowdfunding.piwik.org/custom-segments-editor/

We are crowd funding the future of Piwik and this feature in particular. With your help we can do it.

Thanks

Matthieu