This Week in devot:ee #53 - January 25, 2013

January 25, 2013
by Ryan Masuga

This week we improved the reports area for developers, built a License Keys API, and secured the members and reports areas.

Recently Rolled Out

Better Reporting for Developers

Old Sales ReportsOld sales reports. Click for full size view.

This week we're very happy to announce that we implemented a much better reporting area for developers, which is something we've wanted to do for a while. The old sales reports were pretty basic. You could click a month to get an overview of that month's sales, or click a year to see the breakdown for the year. We even had a small list of dates that allowed you to click on a specific date to see sales for that day. All of this took up a large chunk of the sidebar and was starting to get unwieldy after a few years. Beyond that, there was a list of your customers at the bottom of the page. That was essentially the limit of the reporting we've offered.

We have much better options for developers now. The new page is segmented into reporting blocks that highlight different areas of your sales: total profits, number of add-ons sold, add-on revenue, and then more detailed lists of who purchased your add-ons. We've included a number of convenient buttons in each area that will load different date ranges: 7 days, 30 days, 60 days, Month, Year, All Time, and Custom which allows you to select custom date ranges. The columns in the tables are sortable in the Profit and Sales of Add-ons blocks.

Old Sales ReportsNew sales reports. Click for full size view.

The Profit block is interesting in that there is a column that automatically selects the previous segment of time to what you've selected and shows you a percentage change. For example, if you select "30 Days", the Previous Segment column will select the 30 days before that, and then you'll get a calculation as to whether you're up or down - both by specific add-on and overall. Same goes for every date selection in this area: if you select a year, we'll also show you the previous year. If you select a custom date range, we'll select that same range for the Previous Segment and so on.

The Sales of Add-ons has a couple cool features. In this block you can enter search terms to filter your results, which will help you find a particular user or license number. You can also download a CSV of your results.

We've included some small help icons throughout the page that you can click to get more information about what each section is showing. You can click a link at the top of the page to reveal the help icons. 

We're very excited to present this additional functionality for ExpressionEngine developers. We have some other ideas about what we'd like to do in this area, and if you have any ideas, we'd love to hear them. Just email us at

New License Keys API

We implemented a new License Keys API that is slightly different than the Orders API. This will output all the keys associated with your add-on sales. This API is a little leaner, and has the same data you might be used to getting from the old License Keys page. If you are logged in to devot:ee, you can access the license keys JSON output by navigating to, otherwise, you can post your 'api_key' and 'secret_key' to that URL to get your license keys JSON data. Here is an example of how you might access the License Keys API:

  License Keys API Test Template

// Authentication Criteria
$api_key    = "0a1b2c3d4e5f6g7h8i9j0k";
$secret_key = "0a1b2c3d4e5f6g7h8i9j0k0123456789abcdefghijk";

// Create the post string
$post = array(
    'api_key'        => $api_key,
    'secret_key'    => $secret_key

// Process 
$url = "";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post) );
curl_setopt($ch, CURLOPT_POST, 1);
$response = urldecode(curl_exec($ch));

echo "<pre>".print_r( json_decode($response), TRUE)."</pre>";

For now, you can still view license keys at, and you should be able to get that info as JSON by tacking 'json' onto the last segment like but we would strongly encourage you to use the new /api/license-keys URL because it is faster and more reliable, and we might do away with the URL in the members area (we'd give you fair warning before doing that, though).

Secure Members and Reports Areas

We took time this week to make sure your members and reporting areas are delivered over SSL. This has led to a few small glitches, particularly with downloads of commercial items, but we worked through those issues. If you come across anything we missed, please email us at

New Add-ons This Week

  • Table of Contents by Mark J. Reeves (Slim Kiwi)
    A quick plugin that parses HTML for H3 tags and generates a table of contents with jump links.
  • PDF Press ($) by Anecka (Pat Pohler)
    PDF Press is the easiest way to save your ExpressionEngine templates to PDF. PDF Press is a stand-alone module, you don't need any additional services or 3rd party software.
  • Custom comment fields ($) by Yuri Salimovskiy (IntoEEtive)
    Here's the add-on that allows to have custom fields added to ExpressionEngine 2 commenting system, and also attach files to comments!
  • Timee by Carlos Quijano
    Timee, humanized time for EE2. Timee is a tiny plugin that helps you convert a timestamp into a humanized relative time such as "5 minutes ago", "one hour ago" and so on. It's very similar to channel entries {relative_date} variable but lets you specify your own timestamp.
  • Sift ($) by Joel Bradbury
    Sift gives you amazing search and filter powers on your matrix fields. Filter data down rows and only display those that match, simple.
  • Facebook Photos by Cold Coder (Cold Coder)
    This addon allows you to pull photos from a public facing Facebook page using Facebook Graph. Gives you a tag pair to place the photos where-ever you would like.

There are no comments for this item.


You must be registered member to comment. If you're already a member, log in now, and if not go register (it's free and easy!).