cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Reporting doesn't work and there is an error 404

Advanced Reporting doesn't work and there is an error 404

Hello,

We use Magento 2.3.0 but Advanced Reporting doesn’t work Smiley Sad

There is an error 404, but we’ve already checked everything and done all steps from Troubleshooting of all instruction given on Magento guideline.
  • We’ve verified that the Magento Analytics user integration appears in the list, and that the Status is “Active.”
  • We’ve reauthorized Access to API Resources
  • We’ve waited for the next scheduled update.
But it still doesn’t work...
 
Please, help!
17 REPLIES 17

Re: Advanced Reporting doesn't work and there is an error 404

Hello @svetlana_krutsk ,

 

 

Step 1: Enable Advanced Reporting
In the Magento configuration, Advanced Reporting is enabled by default, and starts automatically if cron is configured and running. An attempt to establish the subscription is initiated at the beginning of each hour over the next 24-hours until successful. The subscription status is “pending” until the subscription is successfully established.

1. On the Admin sidebar, choose Stores. Then under Settings, choose Configuration.
2. In the panel on the left, choose General. Then under Advanced Reporting, do the following:
a. Verify that Advanced Reporting Service is set to “Enable.” (This is the default setting.)
b. Set the Time of day to send data to the hour, minute, and second, according to a 24-hour clock, that you want the service to receive updated data from your store. By default, data is sent at 2:00 AM. 

c. Under Industry Data, choose the Industry that best describes your business.
https://www.screencast.com/t/yJJ4rmhpLdy

config-general-advanced-reporting.png

3. When complete, tap Save Config.
4. When prompted, click the Cache Management in the message at the top of the page. Then, refresh any invalid caches.
5. Wait overnight, or until after the time of your next scheduled update. Then, check the status of your subscription. If the status is still “pending,” make sure that your installation meets all of the requirements.


Step 2: Access Advanced Reporting
1. Do one of the following:
In the Admin sidebar, choose Dashboard. Then, tap Advanced Reporting.
On the Admin sidebar, choose Reports. Then under Business Intelligence, choose Advanced Reporting.
The Advanced Reporting dashboard provides a quick summary of your orders, customers, and products. Make sure to scroll down to see the full dashboard.

2. To get a better view of the data, set the Filters in the upper-right corner to the time period and store view that you want to include in the report. Then, do the following:
Hover over any data point for more information.
Click each tab to see all dashboard reports. https://www.screencast.com/t/o17RZUMMZZib
reporting-advanced-data-point.png

 

To access your data resources:
1. In the upper-right corner of the Advanced Reporting dashboard, click Additional Resources.

https://www.screencast.com/t/jC9DBVrySt8

advanced-reporting-your-data-resources.png

Troubleshooting
If you get a 404 “Page Not Found” message, verify that your store meets the requirements for Advanced Reporting. Then, follow the instructions to verify that the integration is installed. https://www.screencast.com/t/5uqdw8gWz6e0

advanced-reporting-404.png
Verify that the Integration is Active

1. On the Admin menu, choose System. Then under Extensions, choose Integration.
2. Verify that the Magento Analytics user integration appears in the list, and that the Status is “Active.”
3. To reestablish the user, click Reauthorize. Then, do the following: https://www.screencast.com/t/LfC6olgMW

advanced-reporting-integration-reauthorize.png
a. When prompted, tap Reauthorize to approve access to the API resources.
https://www.screencast.com/t/ht1W9sBYXtD1
advanced-reporting-integration-api.png

b. Verify that the list of Integration Tokens for Extensions is complete. Then, tap Done.
https://www.screencast.com/t/n0J1TSCMgrF
advanced-reporting-integration-tokens-for-extensions.png

4. Look for the message that indicates the integration “Magento Analytics user” has been reauthorized.
5. Wait overnight, or until after the time of your next scheduled update

 

 


--
If my answer is useful, please Accept as Solution & give Kudos

Re: Advanced Reporting doesn't work and there is an error 404

hi @gelanivishal 

- We have Enabled status in subscription

- we reathoirized twice

- wait > 5 days

but the Advanced Reporting still 404 page (  

Re: Advanced Reporting doesn't work and there is an error 404

Hello, Thank you for your help, but unfortunately it wasn't resolved... We checked everything you've suggested, but it's still 404 error. Do you have any other ideas why it doesn't work?

Re: Advanced Reporting doesn't work and there is an error 404

i have also face the same problem
m using magento2.3.0 CE 
store url link
rcg.com.pk/
i have followed the documentation all steps are verified 
but still show 404  and 
status is pending screenshot-rcg.com.pk-2019.05.06-12-59-26.png

Re: Advanced Reporting doesn't work and there is an error 404

I have the same issue in 2.3.1, any solution for fix it?

Re: Advanced Reporting doesn't work and there is an error 404

I am using 2.3.2 and still getting the error

Re: Advanced Reporting doesn't work and there is an error 404

After struggling with this problem, I've found that it seems the advanced reporting panel has any kind of issue when it cannot link all the data together. The data it receives include information about customers, products, quotes, orders, order_items, wishlists and wishlist_items, amongst others. So it tries to build data by linking each entity with the others, e.g. the order with a customer, the order_item with a product.

 

The problem seems to reside when you have orphan data in your db. In the previous example, a non-existing customer_id in order, a non-existing product_id in order_item.

 

In our case, as it is still a develop environment, we solved it by cleaning up sales and wishlist data:

DELETE FROM sales_order;
DELETE FROM sales_order_grid;
DELETE FROM quote;
DELETE FROM wishlist;

If this is not suitable for you, then you have to find and update the orphan rows (please note this solution is not tested):

UPDATE sales_order target
LEFT JOIN customer_entity ce ON target.customer_id = ce.entity_id
SET target.customer_id = NULL
WHERE target.customer_id IS NOT NULL AND ce.entity_id IS NULL
;

UPDATE quote target
LEFT JOIN customer_entity ce ON target.customer_id = ce.entity_id
SET target.customer_id = NULL
WHERE target.customer_id IS NOT NULL AND ce.entity_id IS NULL
;

UPDATE wishlist target
LEFT JOIN customer_entity ce ON target.customer_id = ce.entity_id
SET target.customer_id = NULL
WHERE target.customer_id IS NOT NULL AND ce.entity_id IS NULL
;

UPDATE sales_order_item target
LEFT JOIN catalog_product_entity cpe ON target.product_id = cpe.entity_id
SET target.product_id = NULL
WHERE target.product_id IS NOT NULL AND cpe.entity_id IS NULL
;

UPDATE quote_item target
LEFT JOIN catalog_product_entity cpe ON target.product_id = cpe.entity_id
SET target.product_id = NULL
WHERE target.product_id IS NOT NULL AND cpe.entity_id IS NULL
;

UPDATE wishlist_item target
LEFT JOIN catalog_product_entity cpe ON target.product_id = cpe.entity_id
SET target.product_id = NULL
WHERE target.product_id IS NOT NULL AND cpe.entity_id IS NULL
;

After this, either force analytics_collect_data using n98-magerun2:

/usr/local/bin/n98-magerun2.phar sys:cron:run analytics_collect_data

or wait until next scheduled data collection.

Re: Advanced Reporting doesn't work and there is an error 404

Also, if using Magento Commerce version, you may have to patch \Magento\PageBuilderAnalytics\Model\ContentTypeUsageReportProvider::getReport as it may fail due to strict types comparison:

 

--- /Model/ContentTypeUsageReportProvider.php
+++ /Model/ContentTypeUsageReportProvider.php
@@ -102,7 +102,7 @@
                     foreach ($contentTypes as $type) {
                         // Count the amount of content types within the content
                         $typeCounts[$type['name']] += substr_count(
-                            $row['content'],
+                            $row['content'] ?? '',
                             'data-content-type="' . $type['name'] . '"'
                         );
                     }

Re: Advanced Reporting doesn't work and there is an error 404

For anyone that wants the SELECTs to check the DB.. turns out in my case i have a client that did have orphan data. .orders for products that no longer existed. No idea yet if it resolved the pending status thou. Have to wait 24hrs

 

 

SELECT * FROM `sales_order`AS target
LEFT JOIN customer_entity ce ON target.customer_id = ce.entity_id WHERE target.customer_id IS NOT NULL AND ce.entity_id IS NULL

 

SELECT * FROM `quote`AS target
LEFT JOIN customer_entity ce ON target.customer_id = ce.entity_id WHERE target.customer_id IS NOT NULL AND ce.entity_id IS NULL


SELECT * FROM `sales_order_item`AS target
LEFT JOIN catalog_product_entity cpe ON target.product_id = cpe.entity_id WHERE target.product_id IS NOT NULL AND cpe.entity_id IS NULL

 

SELECT * from `quote_item` AS target
LEFT JOIN catalog_product_entity cpe ON target.product_id = cpe.entity_id
WHERE target.product_id IS NOT NULL AND cpe.entity_id IS NULL;

 

SELECT * from `wishlist_item` AS target
LEFT JOIN catalog_product_entity cpe ON target.product_id = cpe.entity_id
WHERE target.product_id IS NOT NULL AND cpe.entity_id IS NULL;