Firefox user notice:

Please use different web browser to view this document.

Sorry for the inconvenience.

Advanced Reports - Magento2

Magento 2 Advanced Reports provides a comprehensive overview of a web store’s performance. A straightforward dashboard includes 10 report widgets representing the actual state of a business. Reporting data can be compared by various time periods and sorted by specific customer segments. Each report reflects a particular performance aspect. With the extension’s drill-down functionality, store admins can view report data more detailed.

Compatibility: Magento Open Source 2.1.X - 2.3.X, Magento Commerce 2.1.X - 2.3.X

Thank you for choosing Aheadworks!

Installing Advanced Reports

Command Line Installation

1. Backup your web directory and store database

2. Download the Advanced Reports installation package

 3. Upload the contents of the Advanced Reports installation package to your store root directory

 4. In the SSH console of your server, navigate to your store root folder:

cd path_to_the_store_root_folder

run the following command:

php -f bin/magento module:enable Aheadworks_AdvancedReports


php -f bin/magento setup:upgrade


php -f bin/magento setup:static-content:deploy

5. Flush the store cache; log out from the backend and log in again

Make sure the installation is done from under the FTP administrator account. Otherwise, make sure to set 775 permissions to the store root directory after the extension is deployed.

Composer Installation

1. Log in to your customer account at and navigate to Account -> Composer access;

2. Configure your store to work with the Aheadworks composer repository:

Add composer repository to composer.json by running:

composer config repositories.aheadworks composer in the Magento installation root.

Use the provided key pair as a login and pass. You can optionally save them in the global composer auth file.

 3. You can start using AW composer now.

 For extension names, navigate to Account -> Composer access.

 4. Open the root Magento directory on your server and send Composer the following command:

composer require <component-name>:<version>

Note: Use the previously copied component's name and version.

 5. Make sure that Composer finished the installation without errors. Flush the store cache, log out and log into the backend again.

Updating to a New Version

When updating to a new version, one should reindex the Advanced Reports extension via the console. To do this, follow these steps:

  1. Open the console and log in to your store server;
  2. Navigate to the Magento root folder;
  3. Run the following command: php -f bin/magento indexer:reindex aw_arep_statistics.

This will start the report reindex. Note that this command doesn't reindex the whole store; only the report tables will be reindexed.

This should be done so that new tables introduced in the version 2.3.0 will be filled with reporting data.

With the release of the version 2.7.0, the database is not blocked (as it was in the previous versions) when the module's reindex is running.

Set up cron

If you have already configured cron jobs for your Magento installation, then you can skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide.

Generally, it would be enough to run in the SSH console of your server: 


crontab -e


And insert the following line:  


*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento cron:run
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/update/cron.php
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento setup:cron:run

Don't forget to confirm saving the request when exit.



Introducing Advanced Reports

Magento 2 Advanced Reports gives an insight into the store's performance with a set of 12 reports (the 4 general and 8 detailed ones).

General Reports

  • Sales Overview –  a detailed order representation with average values for the sales period;
  • Traffic and Conversion - the unique page visits to orders placed ratio;
  • Abandoned Carts - introduces the abandonment cart rate statistics to the store;
  • Customer Sales - segment customers by total sales within the specified period.

Detailed Reports

  • Product Performance – a per-product sales report;
  • Sales Detailed - sales per order;
  • Sales by Category – the product categories' performance for the set period;
  • Sales by Product Attributes - an overview of an attribute or attribute combination sales (only attributes with the 'Use for Promo Rule Conditions' option enabled are processed);
  • Sales by Location - provides an overview of customers by country for identifying new promotional campaigns;
  • Sales by Coupon Code – the number of coupon uses with the total discount applied;
  • Sales by Payment Type – the number of orders placed and items ordered per payment method;
  • Sales by Manufacturer – product manufacturer perspective sales.

Extension Logic

With the module, store admins can analyze various performance aspects. Each aspect is represented in a particular report. The report dashboard shows totals from each report displayed in switchable widgets. From there an admin can access each report separately to get a more detailed performance picture. The data in the dashboard can be compared to previous figures within a particular time period.

On the configuration page, one can set particular parameters for individual reports as well as define price ranges for all reports at once.


Getting Around

Report Dashboard

The report dashboard represents the overall store's performance with 10 report widgets.

Report Dashboard

More specifically, the dashboard contains 8 numeric and 2 chart widgets. The widgets are customizable, so you can set up the content of each one individually with the provided box in the upper-right corner of each widget.

Chart widgets visually represent performance trends and can be used for the most important reports and parameters, e.g. sales and conversion rates.

The data in the dashboard are presented in the comparison mode. In this way, all the widgets highlight two sets of numbers related to the current and compared periods. The module provides the following comparison options:

  • Today
  • Yesterday
  • Week to Date
  • Last 7 Days
  • Last Week (Sun - Sat)
  • Last Business Week (Mon - Fri)
  • Month to Date
  • Last Month.

The growth of each performance indicator is presented in the green color, while declines are highlighted in the red one. By default, you see the percentages in each widget. They are changed to the absolute values on mouse hover.

The content of widgets, particular time ranges, and other settings are automatically saved by the extension so you do not need to configure them every time you enter the dashboard page. In addition, you can save several dashboard views as bookmarks for particular business purposes and switch between them swiftly to get an even better understanding of any set of your performance aspects.

Finally, the dashboard has its own set of filters apart from the other reports. So, here you can track the performance of particular customer groups, store views, and orders with different statuses.

Performance Reports

Report Elements

The reporting section is located under Reports > Advanced Reports by Aheadworks where you can find all available reports. Generally, each report page has the following elements:

  • Navigation menu – used for a quick navigation within the extension. With the help of the navigation menu, you can switch to the required report.
  • Calendar – used to set the reporting period. It comes with the same predefined reporting periods as the report dashboard. Additionally, you can set custom comparison periods.

Report Calendar

  • Report intervals – used to group the reporting data by the required period;

For example, you can generate a report from a whole month (1st to 31st) and group the report table entries by day (31 entry – day-by-day sales), week (5 entries – week total sales), or month (1 entry – month sales total).

  • Report chart – used to visualize sales data in a readable form;
  • Chart parameters - these represent the most important aspects of the particular report that can be presented in the chart;
  • Dual Y-axis - two-axis charts present twice more information in one place;
  • Totals block - represents the report's specific totals for a quick evaluation;
  • Report grid – represents the report's specific sales data built for the period defined in the calendar;
  • Filters and report grid adjustments - represent a set of filters, including customer group, segment, and report specific criteria that can be applied to get more details.

For more convenience, the generated reports can be later exported to the .csv or .xml tables with the help of the 'Export' button above the report grid.

Generating a Report

The extension comes with 12 reports each covering a particular aspect of the store's performance. To generate a report, take the following steps:

Step 1

Select the required report from the list available under Reports > Advanced Reports by Aheadworks.

Step 2

Use the calendar to select the required report date range and click .

Step 3

The report is generated. Now, you can adjust the reporting period grouping to get the required report representation and adjust the filters if necessary.

Step 4

Once the required filters are selected, save the report's view by expanding the 'Default View' box and clicking Save view as...

The saved view will be transferred as you navigate through reports. It can be recalled anytime you make changes to the filters or the report grid.

Report Drill-down

All reports are interconnected, meaning that you can get a more in-depth look at the report entry with each click.

Taking the 'Sales Overview' report as a starting point, you can navigate to the 'Product Performance' report by clicking the required report entry. The 'Product Performance' period will match the 'Sales Overview' report entry chosen and will be grouped accordingly.

Moreover, clicking the 'Product Performance' report entry will take you to the 'Individual Product Performance' report page.

Report Breadcrumb Trail

You can use the breadcrumb trail above each report chart to get back to the starting or some intermediate location.

The available drill-down scenarios are:

  • Sales Overview > Product Performance;
  • Product Performance > Product Variant Performance;
  • Sales by Category > Product Performance;
  • Sales by Coupon Code > Sales Overview;
  • Sales by Payment Type > Sales Overview;
  • Sales by Manufacturer > Product Performance;
  • Traffic and Conversions > Product Conversion >
  • Sales by Location > Sales by State/Region > Sales by City/Place.

Comparing Periods

Almost all of the provided reports suggest comparing one sales period to another. To compare a period, expand the calendar and tick the 'Compare to' checkbox.

Comparing Periods

Then define the period for comparison. When the period is set, click . The page will refresh, and you will see the chart with the lines for two periods (the straight line for the current period, and the dotted line for the compared period).

Report Main Info

In this case, report charts display the main and the compared period bars and line charts, while totals blocks display percent-based and absolute changes along with the compared data provided in gray.

Note: Particular report settings, including time ranges, comparison periods, etc. are stored by user sessions and do not change as soon as you browse different reports.


Extension Settings

The extension's general settings can be accessed from Stores > Configuration > AHEADWORKS EXTENSIONS > Advanced Reports.

Extension Settings

The page is divided into the three sections: Order Statuses, Ranges, and Manufacturer Attribute'

  • Order Statuses - the selector defines the orders the extension will process for building reports. By default, only complete orders will be processed.

If required, you can select additional order statuses for the extension to process using  +  to select a group of orders or  +  to select order statuses one by one.

The above setting determines the orders at the extension level. You can also specify the order statuses to be processed for each report individually by clicking the 'Report Settings' button above the corresponding report's grid.

  • Price Ranges - price ranges to be used by the 'Customer Sales' report.
  • Manufacturer Attribute - the product attribute to be used as a basic parameter for the 'Sales by Manufacturer' report. You can select the 'Manufacturer', 'Color', 'Size', and 'Format' options.


Report Indexes

Starting from the version 2.0.0, the extension introduces report indexes helping to load data for the required reporting period much faster.

Report indexing eliminates the need for report generation on demand. Basically, the reports are generated once a day (or more frequently depending on the cron settings). Post-generated results are loaded when you open a report.

Report indexing is particularly useful for order-heavy stores. For example, it should not take more than a couple of minutes to reindex ~200k orders on a decent server hardware. Without this processing, you might have considerable lags while generating reports.

How to index reports?

As it was mentioned above, the reports are indexed automatically depending on your store cron setup. By default, cron runs once a day, meaning that the reporting data will always be up-to-date.

You can always run reindex manually, however, it involves console usage.

To learn how to run the report reindex manually, read here.

Once the reindex has been done, you get the latest data from the processed reports.

Will the Advanced Reports extension process the orders placed before the installation?

Yes, the Advanced Reports extension will index ALL orders placed in the store.

With the release of the version 2.7.0, the database is not blocked (as it was in the previous versions) when the module's reindex is running.



I have deleted the product. Will it impact the reports?

If the product was deleted, the 'Product Performance' report will erase its SKU's from the order table. It means that configurable products and products with custom options will have their SKU's marked as 'product was deleted'. The deleted products will not impact the report performance or the data generated.

I can't see the attribute in the 'Sales by Attributes' report!

Make sure you have enabled the 'Use for Promo Rule Conditions' option for the attribute you cannot find in the report. If required, refresh cache and reload the page.

Why can't I see some configurable and bundle products in the 'Sales by Attributes' report?

It depends on whether you have set a dynamic or fixed price for the corresponding configurable and/or bundle products.

  • If you have set dynamic prices - only child products will be considered while building the report;
  • If you have set fixed prices - both parent and child products will be considered while building the report.

How is the profit calculated in the 'Product Performance' report?

Total revenue, cost, profit, and margin are calculated by the following formulas:

Total Revenue (excl. Tax)

Total Revenue (excl. Tax) = sum for each item (Item final price * Qty sold - Taxes - Total discount)

Total Cost

Taken from the order, not from the current product attribute value

Total Profit

 Total Profit = Total Revenue (excl. Tax) - Total Cost

Total Margin

 Total Margin = (Total Profit / Total Revenue (excl. Tax)) * 100

Uninstalling Advanced Reports

Manual Removal

1. Disable the module by executing the following commands:

php bin/magento module:disable Aheadworks_AdvancedReports
php bin/magento setup:upgrade

2. Remove the extension files from the following folder:


Automatic Removal (via Composer)

1. Disable the module by executing the following commands:

php bin/magento module:uninstall Aheadworks_AdvancedReports

Need Customization?

Magento 2 Custom Development Services by Aheadworks

You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on
License agreement:
Contact Us:
Copyright © 2019 Aheadworks Co.