-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static PNG Graph: plot several metrics & multiple row evolutions #3013
Comments
This feature would be very useful for:
|
This ticket seems to be more than plotting multiple metrics. #3014 requires the ImageGraph plugin to also plot row(s) evolution. The first question we need to answer is whether we :
If the first option is selected, we need to define when should the Row Evolution API be solicited. Here are the main two cases I could think of :
This evolution will also require to update the Metadata imageGraphUrl field. The current behavior of the imageGraphUrl is as follow :
After updating the ImageGraph API to support row(s) evolution, we need to determine the value of the imageGraphUrl field for the first case (API.getMetadata Referers.get period=day date=last30). Instead of rewriting &period &date, the imageGraphUrl would contain an API call which returns row evolution. However, we need to decide which label(s) should be drawn. Ideally, we could plot all labels. This gets complicated when the report does not have a constant number of labels (constantRowsCount!=1) or when the number of rows is too big. |
Replying to JulienM:
Thank you for your great analysis :)
I think this solution is nice indeed!
Agreed that when no labels are supplied, we could plot the evolution of the top 5 labels for example ?
Plotting all labels it not so possible, because above 5 lines the graph becomes hard to read.
--> &labels and &filter_limit support sounds like perfect API evolution for this feature! There is also an open question about how to plot Ecommerce metrics, Goal metrics, on the graph. Maybe in a different ticket we could propose to have &enhanced=1 parameter that would return the goal/ecommerce metrics as well. |
Attachment: |
Pending comment:3:ticket:3158. If it can't be fixed, we can throw an exception when trying to plot row evolutions for Goal reports when Piwik_ImageGraph_API.get $idGoal is not empty. We would also need to alter the imageGraphUrl construction logic to switch back to non-evolution graph. |
The logic to retrieve the top 5 row evolutions should maybe be part of #3158, see comment:4:ticket:3158. |
Attachment: &labels=Search Engines,Direct Entry,Websites&columns=nb_actions |
Very nice graphs!!
|
Attachment: http://dev.piwik.org/trac/ticket/3158#comment:3 getRowEvolution now supports $idGoal |
(In [6918]) refs #3013
refs #3014
refs #3158
constantRowsCount set on
merges
IDEA
TODO
|
Great patch and improvements! :)
--> This other way to solve would be better than the committed fix: sometimes it is important to delete the rows that have visits=0 but some conversions, because sometimes the "Keywords" or "websites" used in previous visits can be credited a "conversion" if they are the last referrer. So not deleting the conversion==0 row in this datatable would result in the UI showing rows with 0 visits which was a bug we fixed with this code to delete rows :)
Here it would be more efficient to directly call the API using Piwik_API_Request() and http_build_query() to build the request string. You should be able to use the functions: Piwik_Archive::isMultiplePeriod and Piwik_Period_Range($dateString) to get the last date of the range. let me know if there is any problem doing this change? it will speed up graphs.
|
(In [6925])
refs #3013
|
paste due to misclick on my new laptop ;) |
(In [6969]) refs #3013
|
(In [6970]) refs #3013
|
(In [6982]) refs #3013
|
(In [7009]) refs #3013
|
This is a test comment but a real comment too, awesome work & can't wait to see the next improvements ;-) |
(In [7026]) refs #3013
|
(In [7077]) refs #3013
|
(In [7078]) refs #3013
|
(In [7079]) refs #3013
|
(In [7086])
refs #3158
|
(In [7088])
|
(In [7102])
|
This ticket is getting long, What is the status of #3013? |
It would be very nice of the Static Image Graph API could plot several metrics at once, similarly to the JS graphs.
For example we could plot Visits and Pageviews on the same graphs with:
index.php?module=API&method=ImageGraph.get&idSite=3&apiModule=VisitsSummary&apiAction=get&token_auth=anonymous&graphType=evolution&period=day&date=previous30&width=500&height=250&columns=nb_actions,nb_visits
The Static Image Graph API should also support a new parameter named &labels to plot multiple row evolutions.
The text was updated successfully, but these errors were encountered: