scottopolis / edd-metrics Goto Github PK
View Code? Open in Web Editor NEWEDD Metrics
EDD Metrics
The earnings by gateway report lists "Amazon" in the key - however I've never (knowingly!) used Amazon payment gateway:
https://www.dropbox.com/s/zeuyvr9j8cany9s/Screenshot%202016-09-14%2012.35.30.png?dl=0
Hello,
I wonder if this plugin development is still active, but I really hope so, because it is awesome! Would it be easy to add "Recurring Next 1 Year" next to the already existing "Recurring Next 30 Days"? It's basically the only main statistics missing for me. It would be awesome to have it.
Cheers and all the best for 2018 :)
Thanks for this!
Here is a function to add a little box with the estimated monthly numbers:
https://gist.github.com/halgatewood/1bac38b018d4bd9a97ea48aec60f071c
Hi,
I would like to suggest a little feature. It would be great to have the choice between Daily, Monthly and Yearly (at least that) in the Revenue Detail. It's the only basic feature missing to this already great plugin. I can probably help coding it a bit but would you have a few pointers to make this dev faster and cleaner? Maybe there is very few to add to make this work, so I thought I would ask first. Thank you :)
When loading the Metrics dashboard, I'm seeing this JS error:
Uncaught TypeError: Cannot read property 'count' of null
https://edd.com/basic/wp-content/plugins/edd-metrics/assets/js/admin.js?ver=1.0 line 86
I think it's because the refunds and renewals graphs have no data.
Additionally to the renewals it would be very helpful to get statistics for license upgrades (EDD SL Addon) as well. ๐
My EDD install uses โฌ as currency. The symbol should be after the amount not before.
You should grab the EDD settings to set yours
E.g: 255,50 โฌ
Parse error: syntax error, unexpected โ[โ in wp-content/plugins/edd-metrics/includes/class-edd-metrics-functions.php on line 302
I run a freemium WordPress theme shop, which means we sell a lot of themes for $0. It'd be good if we could exclude these sales somehow from the metrics, as I think it might be overwhelming the plugin/WordPress. We can't get it to load Refunds, Discounts or Renewal, for example.
Hi Scott,
I know you yanked the recurring revenue estimation from EDD's code, but it's very wrong.
It's pulling in the recurring amount of subscriptions whose expiration date is in the selected date range. However, by its nature, this means it's only including subscription that have expired.
To do this properly, I think it will need to pull all payments that happened in the date range that are associated with subscriptions, excluding first payments so that it's truly only including 'recurring' revenue.
This would need to be tolerant of trials as a trial creates a $0.00 initial payment and then the completion of the trial creates another payment. So it would need to exclude the first payment after the $0.00 trial payment as well.
I know EDD's data is a mess and I may create a PR at some point, but wanted to document the issue here in case someone else is eager for a challenge.
Clif
Probably after #14
Title has a mismatched <h1>
with </h2>
https://github.com/scottopolis/edd-metrics/blob/master/includes/view-metrics-details.php#L3
It would be great to see the earnings by download as a percent, along with the pure numbers.
I updated the plugin to include the #17 fix and I wanted to refresh the results, but couldn't. It'd be nice to have a "Refresh" button, or a manual addition of a ?cache
URL parameter to force refreshing the data.
Would be amazing to specify dates or the Revenue Detail data as well
The mini graph on the main metrics page shows some activity:
https://www.dropbox.com/s/4coi0k113lzqt6o/Screenshot%202016-09-14%2012.33.44.png?dl=0
However - clicking through to the Revenue detail just gives a flat, 0 value graph:
https://www.dropbox.com/s/o8jv6yto3hxxuy9/Screenshot%202016-09-14%2012.33.26.png?dl=0
As part of my new startup, I would love to have transparent revenue model like this page: https://ultimatemember.com/open-metrics/.
Would it be possible to have a shortcode that renders the EDD metrics to the front-end?
@scottopolis (This](https://github.com/scottopolis/edd-metrics/blob/master/edd-metrics.php#L230) isn't 100 percent true as you can replace 'EDD_Metrics_activation' function with an array with the first value set to the class instance and the second the class method to call.
Read my post on WordPress hook system https://www.sitepoint.com/understanding-namespaces-wordpress-hook-system/
Btw nice work with this plugin. Love the graph and i just might copy the design of how stats are display in my next project ๐
Something I've been missing very hardly are statistics for single download options/variants:
e.g. selling a plugin with 3 options, right now all extension showing earnings by download but I want to see exactly which of the options produce how much income in detail.
This would be really amazing! ๐
Not sure what caused this but I noticed some division by zero PHP warnings in my server logs on my production site from yesterday (running v0.5.0). Example:
[Mon Oct 10 16:41:20.579279 2016] [:error] [pid 7810] [client 209.136.228.130:20256] PHP Warning: Division by zero in .../wp-content/plugins/edd-metrics/includes/class-edd-metrics-functions.php on line 392, referer: .../wp-admin/edit.php?post_type=download&page=edd_metrics
Somehow the $old_val
passed in here was zero?
edd-metrics/includes/class-edd-metrics-functions.php
Lines 383 to 393 in e476ff2
Sorry I can't narrow it down more than that right now.
Hi Scott,
There seems to be an issue with the "Unpaid commissions" reporting. For some reason it's reporting "undefinied12.00". I am using GBP as my preferred currency.
It's showing correctly as 1 unpaid commission, but the amount value has "undefined" prefixed for the total value.
It would also be useful to have taxes reported within the metrics (ideally by monthly, yearly, etc.).
Great plugin none the less!
Thanks,
David
When switching the date range to "this month" the comparison shows 25% over previous 18 days (it's the 18th of the month).
But in my opinion the numbers should be compared to the complete previous month and not the last 18 days. Cause that's the reason why I select "this month" in order to get the current data AND compare it to the last month.
The EDD customers DB class provides a count()
method that will make your get_customers()
and compare_customers()
methods much more efficient.
Hi Scott, just did a quick beta test on a slightly old staging site I've got (last sale in db was mid-June, first sale was 2012-ish). I ran into a few issues with data not displaying.
Here I chose "last year" and it's returning no sales info. If I choose last six months or a shorter time span it seems to show correctly.
I could never get the earnings by download graph to load, no matter what time range I selected.
When selecting All Time on the Revenue Detail page I get a JS error and the graph never loads. Here it is:
I've worked with chartjs a bit before and I believe this is caused when any data set is missing a label. I think each data set needs a label, if I am recalling correctly.
The plugin looks great. I'm particularly interested in the breakdown of earnings by download over time. A big feature request for me would be the ability to see earnings over time for groups of downloads.
For instance, I sell plugins and themes. I'd love to be able to see earnings for all themes or all plugins. Also, I sell plugins as addons for two different base plugins. So it'd be great to be able to just arbitrarily group downloads and say, "how much did this group earn in total?".
Other metrics that would be interesting: number of downloads per cart, lots more specifically on license renewals, a list of high-value customers. Just throwing these out there, I'm sure you've got plenty of your own ideas. ๐
I don't have any refunds or discounted sales so far, and the boxes load forever:
Inspector's console shows:
VM314:1 Uncaught SyntaxError: Unexpected end of JSON input
I traced this in the minified .js file here:
b.batch2response=function(f){var h=JSON.parse(f);
I don't know what the intended behaviour should be, but never loading issue doesn't seem to be the correct approach. Maybe a "No data yet" message or something similar.
In several places, the get_earnings()
method of EDD_Payment_Stats
is called like this:
$earnings[] = $EDD_Stats->get_earnings( 0, $dt->format( "jS F, Y" ), false, array( 'publish', 'revoked' ) );
This method does not accept a status, so array( 'publish', 'revoked' )
is incorrect.
Method definition:
public function get_earnings( $download_id = 0, $start_date = false, $end_date = false, $include_taxes = true )
WordPress: 4.6.1
EDD: 2.6.8
EDD Metrics: 0.4.0
Loading the metrics page by going to Downalods > Metrics causes the following warnings:
[02-Oct-2016 17:38:09 UTC] PHP Warning: Missing argument 2 for EDD_Metrics_Functions::metrics_batch_1() in /Users/daniel/code/growdev/edd-metrics/includes/class-edd-metrics-functions.php on line 84
[02-Oct-2016 17:38:09 UTC] PHP Stack trace:
[02-Oct-2016 17:38:09 UTC] PHP 1. {main}() /Users/daniel/sites/shopplugins/wp-admin/admin-ajax.php:0
[02-Oct-2016 17:38:09 UTC] PHP 2. do_action() /Users/daniel/sites/shopplugins/wp-admin/admin-ajax.php:91
[02-Oct-2016 17:38:09 UTC] PHP 3. call_user_func_array:{/Users/daniel/sites/shopplugins/wp-includes/plugin.php:524}() /Users/daniel/sites/shopplugins/wp-includes/plugin.php:524
[02-Oct-2016 17:38:09 UTC] PHP 4. EDD_Metrics_Functions->metrics_batch_1() /Users/daniel/sites/shopplugins/wp-includes/plugin.php:524
[02-Oct-2016 17:38:11 UTC] PHP Warning: Missing argument 2 for EDD_Metrics_Functions::metrics_batch_2() in /Users/daniel/code/growdev/edd-metrics/includes/class-edd-metrics-functions.php on line 125
[02-Oct-2016 17:38:11 UTC] PHP Stack trace:
[02-Oct-2016 17:38:11 UTC] PHP 1. {main}() /Users/daniel/sites/shopplugins/wp-admin/admin-ajax.php:0
[02-Oct-2016 17:38:11 UTC] PHP 2. do_action() /Users/daniel/sites/shopplugins/wp-admin/admin-ajax.php:91
[02-Oct-2016 17:38:11 UTC] PHP 3. call_user_func_array:{/Users/daniel/sites/shopplugins/wp-includes/plugin.php:524}() /Users/daniel/sites/shopplugins/wp-includes/plugin.php:524
[02-Oct-2016 17:38:11 UTC] PHP 4. EDD_Metrics_Functions->metrics_batch_2() /Users/daniel/sites/shopplugins/wp-includes/plugin.php:524
The key for the pie chart lists the products that I expect to be included, but the pie chart itself only has data for two products.
https://www.dropbox.com/s/nuuie6iv7tfkm6i/Screenshot%202016-09-14%2012.37.40.png?dl=0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.