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
UserCountryMap: zoomable world map of your visitors location #1514
Comments
Greg, that thing is beautiful! Well done!
Apart from that it looks just great! Did you develop the PiwikMap.swf and if not how is it licensed? |
thanks :) "General_ExportAsImage" is part of the german translation and seems to be missing in the english lang file. Maybe this isn't a bug of my plugin. The second bug is now fixed by setting the flashplayers wmode to "opaque". Yes, I developed the PiwikMap.swf by myself. The only external library I used is the as3corelib (http://code.google.com/p/as3corelib/), which is released under New BSD license. |
Great Plugin and a real alternative to the buggy Maps plugin. |
Good idea. I haven't looked at the GeoIP plugin yet. If it turns out that it works fine and there some kind of xml api to request city data for a given country, I'll try to include this in the UserCountryMap plugin. |
wow. I really like this new widget! Perfect. Thank you! |
Very nice work! I have a few questions
|
Ok, I'll try to get through your questions
There is one more thing I would like to add to the plugin. I just looked at the GeoIP plugin and wouldn't it be nice to add a detailed country-view in which all visitor cities are displayed like in GA? This would require more thinking about the zooming interface, but it shouldn't be a big problem. Do you know if the GeoIP plugin is going into Piwik core as well? I tested the plugin but while it correctly updates the tables with the city/lat/long information, it seems that the rest of the plugin doesn't work right (API call returns no data, etc). |
Answers
Looking forward to your update! |
Updates:
To answer your question on the zoom levels, by now there are only zwo zoom level: world + region, where region means almost the same as continent, except for africa and asia (which are both split into two parts for better zooming experience). |
Excellent updates. Thanks for fixing it quickly :)
For example in trunk
returns:
In trunk currently we don't display anymore the (useless) raw metrics: bounce count, total time spent. but instead we display interesting processed metrics from these (bounce rate and avg visit duration). Let me know if you have any question. Appart from that, code looks good and I'll be happy to commit :) |
Yes, there is a question. I understand that the metadata API is a huge time-saver for many developers, but isn't it a violation of the MVC pattern? As the view code of my plugin would have no more access to the raw data, it would have to re-parse this data out of the formated strings. For example, the SWF map needs the avg_time_on_site value two times: once to calculate the right color for the countries and once to show it in the tooltip. To do the color-calculation, it now would have to parse the total number of seconds out of the HH:MM:SS string. Or even worse, it would have to guess the countries iso-code out of it's translated name. I don't think this is the intention of the metadata API. Is there a way to force it to include both the raw (but preprocessed) values (ids, integers, floats) and the formatted values (translated and formatted strings)? Something like this would be helpful:
|
Another remark (which may be off-topic here): I don't think that the avg. time on website is a sufficient replacement for the total time on website. Both values are very interesting on its own. Also there isn't any other replacement of the total time on the site, neither the number of unique visitors nor the number of actions. Therefore I would suggest to keep the total time on site inside the new metadata API. |
Attachment: minor bugfixes: filter_limit=-1, mac/linux font issues, multiline tooltips |
Attachment: a few suggestions for the design of the map legend |
I think the bar design for the legend is better than the block version. |
Others
Keep up great work and let me know your thoughts |
|
Attachment: second iteration of legend layout, this time with a vertical bar that has a fixed position at the lower left, which should look fine for all continents |
I think I need a newer version of the API plugin. Mine doesn't include a method called getProcessedReport and it isn't listed in the api reference yet. |
Ok, this seems to be the right time to checkout the svn repository :) |
Are there other bug reports that you can think of? |
I updated the repository and the new API now works. One thing I don't understand is that there is a column definition for nb_uniq_visitors below <metadata><metrics>, but there is neither a corresponding column in <columns> nor is there some data below <reportData><row>. Is it simply missing? |
I installed the new update but map won't load, and the error is displayed: Does it work for you? |
error 1088 occurs if the xml document is not well-formed. it works for me. |
Attachment: added error message for #1088 |
Error was in the en.php file (missing comma) But it still doesn't data for me even though I see the successful XML request (check out the file attached, maybe it's too much or something??). |
Attachment: Map is empty but countries widget works |
Attachment: XML returned (seen in firebug) but map is blank |
Thought for future: it would be great to have the same refactored SELECT metrics option list in all Piwik graphs (vertical bar, pie chart). Having the graph only plot visits at the moment has always bugged me and your SELECT looks like the perfect solution! |
I tested your xml file and it worked fine. I also checked out the latest Piwik from SVN and it keeps working. Maybe it has to do something with the Apache or PHP settings. The flash xml parser is very strict and it goes down on the smallest charset issues. We got to fix that bug. Nevertheless I now finished version 0.6. The main changes are:
|
Attachment: |
Attachment: updated screenshot, now with legend |
Hi greg, great work. Can you please email me at matt att piwik.org to discuss the next steps? |
It's working now for me, not sure what the problem was before.
|
after update to 0.6 I get following error:
|
|
Attachment: |
@beatgarantie: Do you have the latest version of the API plugin installed? The plugin makes a internal api request on API.getMetadata(). |
@greg: |
Attachment: version 0.7: added fullscreen button, displaying buttons through flash instead of javascript to get rid of the flashplayers security exceptions on fullscreen |
I just checked in the plugin into svn :) |
Great stuff! |
(In [2718]) Refs #1514 Also updated http://piwik.org/the-piwik-team/ and listed Gregor Aisch in the list of Contributors |
(In [2809]) Refs #1514 |
Hello Gregor, can you help me finding the package org.piwik.data.Metric? I need this to compile and test a possible fix to #1634. |
Here's a little patch to make the map show up in the Location&Provider submenu. It requires patching some files from Provider and GeoIP, unfortunately I could not find a way around that. Also, it is suffering from a bug in firefox, where flash content which has both with and height attributes in percent is not displayed after loading, but when the site is rendered anew, for example opening/closing firebug. I tried a few workarounds I found on the net, but none of them seem to work here.
|
The changes to lang/*.php are wontfix. The problem is that GeoIP should return "xx" instead of "". Note: this ticket is closed. Please open a new ticket (or an existing one for map improvements). |
see the ticket to include world map in the country report: #1821 |
This plugin adds a worldmap widget to your dashboard. The map is rendered in flash (swf size: 216kb) and has no dependencies to other services like google maps.
the plugin load the data via API call from UserCountry plugin.
by now, the plugin is able to dsiplay the following data:
I built in PNG export and tried to adapt the look and feel of the OpenFlashCharts used in the DataTableView component.
The text was updated successfully, but these errors were encountered: