-
-
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
Log Analytics: Monitor Bandwidth for each page, download, and measure overall traffic in bytes #5248
Comments
Thanks for the feature suggestion! Do you have a sample log line containing the "Bytes" information? The steps will be:
What reports do we want for Bytes? This was also discussed in forum post |
we want to output 'transfer amount' to reports. It's the same as Urchin's feature "Total Bytes Transferred" and "Directory vs Bytes". Number of bytes transferred is recorded in the raw log files of HTTP server. In the case of apache LogFormat this is %b. |
Sample line. <CLIENT> - - +0200 "GET /larry/images/contactpic_32px.png HTTP/1.1" 200 287 "<REFERER>" "<USER_AGENT>" It's the regex name "length" https://github.com/piwik/piwik/blob/master/misc/log-analytics/import_logs.py#L247 I assume that this line add the "Bytes" information into the hit structure. In case the assumption is right the the "Bytes"-data are already in the hit structure. https://github.com/piwik/piwik/blob/master/misc/log-analytics/import_logs.py#L1643 Why is a custom variable necessary? Are there any limits with custom variables compared to 'normal piwik variables'? Isn't it possible to add a column into 'log_visit' or 'log_conversion' Table? piwik/blob/master/core/Db/Schema/Mysql.php What reports do we want for Bytes? http://www.stedee.id.au/awffull_demo2/usage_200608.html#hourStats http://www.nltechno.com/awstats/awstats.pl?config=destailleur.fr It would be nice to see traffic per site. It would be also nice to be able to create traffic reports for the STATIC_EXTENSIONS and DOWNLOAD_EXTENSIONS based on URLs. |
Original description was:
|
Sorry for the late response. |
There are three possible next steps:
|
Ok thanks. |
Proposal: let's implement this as one of Piwik core plugins. Most of users don't use log analytics and it would be very painful for many users to update log_link_visit_actions table schema. Question: How to extend log_analytics python script to add this new parameter to the tracking request only in case the plugin is installed (we don't want to produce hacks). @mattab: please let me know your thoughts. |
I guess the import_logs could always send the bytes information, and then the Tracking API would only record it in case such custom plugin is activated. |
Would be nice to have a Tracker API parameter for this. I would maybe use this feature in Piwik Mobile as well to see how many bytes are transferred on average for one pageview. |
+1 |
Maybe a plugin on the marketplace? Especially since we do not directly need something in piwik.js. Could be a nice plugin example for how to do such things. Later we could also at some point work on how to make piwik.js for plugins extensible but that's another issue |
this would be ideal! |
what would be the plugin name for this? |
Good question... Maybe
|
Turns out it will be most likely not doable this way by archiving the bandwidth report and merging it with the getPageUrls eg because of different subtable ids. Committing the current state of this plugin tough in case we have to go this way. The next step would be trying to make the actions plugin extensible (Archiving and API)
…end the actions plugin
I won't measure the current page size with JavaScript in Piwik JS Tracker. It is not accurate at all, especially in modern websites/applications and one would maybe expect to include traffic that was caused by CSS / Images / JavaScript files. Tracking only the HTML content is most likely not that interesting. Also it is not yet possible to extend the Piwik JS Tracker with a plugin I think but that's not really a problem. The name will be I won't update Piwik.org as it will be on the Marketplace and explained there. |
This part is not as easy and it is kinda wrong as it can be also used via the Tracking API and not only log analytics:
It is complicated as there are subtables and we would maybe end up showing the columns in the first level but not in a lower level. I might have to send another API request to get the top level report when configuring the ViewDataTable which columns to show. I'd then have to check if any of those has a bandwidth metric or not. I'd also have to request stats for period=month as it would be not as nice to show the columns on some days where there is a bandwidth recorded and on other days not for the same site. It would maybe not happen as often but can still happen, especially around midnight. Re performance this could be cached but makes everything complicated. Might have to archive more numeric records for this which would be easiest probably. |
@diosmosis would you mind having a look at the plugin if there's something strange or missing or so? https://github.com/piwik/plugin-Bandwidth I could use maybe more Metric classes eg for OverallTotalBandwidth, PageviewTotalBandwidth and DownloadTotalBandwidth metrics. Otherwise it seems to work with latest master |
@tsteur The total metrics are aggregated and there's currently no way to express those as metadata classes, so they shouldn't be metrics (yet). One issue is that some aggregated metrics like min/max bandwidth have processed metrics classes, however, it's not a big deal. If/when aggregated metrics classes are supported this can be changed (or not, it will likely still work regardless). |
Ok thx. Closing it for now and waiting for feedback from client. |
Good news: the plugin Bandwidth will be released on the Marketplace! See issue matomo-org/plugin-Bandwidth#1 |
The plugin Bandwidth has been released on the Marketplace: http://plugins.piwik.org/Bandwidth 👍 |
As a user, when importing my server logs in analytics, I want to measure the Bandwidth that was used by each page view.
How would it work?
Proposed implementation:
bandwidth
bw_bytes
log_link_visit_action.bandwidth
Other steps:
Total Bandwidth
How do I measure traffic bandwidth used by a page, and/or overall bandwidth?
To be confirmed / optional:
document.documentElement.innerHTML.length
.The text was updated successfully, but these errors were encountered: