Analytics / import historical data not working
-
I am trying to figure out why our analytics always show no sales. In order to conduct experiments I am using a test environment. I read that after activating the analytics in WC settings, I have to import historical data.
This doesn’t work. When I click the button it says “initializing” and then “importing customers”. But it stays there forever. It shouldn’t be the amount of data, our shop is not that big yet. Looking at the network connections I see a POST to admin-ajax.php and a lot of GET to status?locale=user . All return status 200.
Any idea of where I should look for problems?
The page I need help with: [log in to see the link]
-
Hi @nullkohol,
Thank you for reaching out. I completely understand how frustrating this must be — sales and analytics data are critical for any business, and it can feel overwhelming when they’re not working as expected.
This type of issue is fairly common, though the exact cause can vary. To get a clearer picture of what’s happening, please go to WooCommerce > Status > Scheduled Actions, then look for the most recent entries for wc-admin_import_customers and wc-admin_import_orders, and share a screenshot of what you see.
I’d also like to better understand your setup. Could you share your system status report from WooCommerce > Status > Get Report > Copy for Support and paste it into Pastebin, then send me the link?
Hi @mosesmedh , thank you for trying to help. Yes, I found many threads regarding problems with Analytics and importing historical data, but as you said, it always was a different cause and never fit my circumstances.
Here’s my test setup (most stuff deactivated because of the various problems).
Looking at WC Scheduled Actions, I don’t see any entries at all for wc-admin_import_customers. That’s strange. I see something for wc-admin_import_orders though. Most recent one was completed:
- 2025-08-14 19:05:16 +0000
action created - 2025-08-15 11:07:31 +0000
action started via WP Cron - 2025-08-15 11:07:31 +0000
action complete via WP Cron
Hi there!
Thank you for sharing the system status report. Everything looks fine in the report overall. However, I can see that the database information is [REDACTED]. Sometimes if the WooCommerce database version does not match the WooCommerce plugin version, it can cause issues.
Could you please confirm that your WooCommerce database version is also 10.1.0? If not, you can go to WooCommerce → Status → Tools and click on Update database version.
Once updated, please try re-importing again to see if that resolves the issue.
If you still experience the same problem, could you please:
- Check the browser console for any errors when the import gets stuck, and
- Share any fatal error logs (if available) under WooCommerce → Status → Logs.
Let us know if you find anything.
Hi @shahzeenfarooq ,
yes, my database version is also 10.1.0.
I found a log file called “fatal_errors” but it only contained an error that I caused while messing in functions.php 🙂 that error was long solved, file was more than a week old.
I see no errors in browser console. On the network tab, I see a REST call to /wp-json/wc-analytics/reports/import?skip_existing=true&_locale=user . It returns
{
"status": "success",
"message": "Die Daten der Berichtstabelle werden neu erstellt. Bitte warte etwas, bis die Daten vollständig ausgefüllt sind."
}I also see this message as an alert/notice in the frontend. So obviously the API received the call, but then something happens in the backend … ?
I hope you can make something out of this information. I am puzzled.
Hi @nullkohol,
Thank you for getting back. I reviewed your report again and noticed that you’re using a child theme of Twenty Twenty-Four. Could you please switch to the parent theme (Twenty Twenty-Four) and test if the issue persists?
Also, try installing and activating the WooCommerce Analytics plugin to see if that resolves the problem. If neither of these steps works, please share the fatal error you mentioned earlier. Even though your initial issue was resolved, custom features could still be interfering with other parts of the site.
I’d like to review that fatal error to confirm whether it has any connection to WP Admin features or analytics.
Hi @mosesmedh , thank you for trying on 🙂
I switched to Twentytwentyfour theme, but nothing changes in the import (looks like it’s starting, but then nothing happens).
I am currently installing WooCommerce Analytics to see if that helps. However, it says in the plugin details that it’s still in early access/beta stage. That’s not something I would easily install in a productive system. On our test platform I don’t mind.
Also now I see a message “WooCommerce Analytics requires Order Attribution to be enabled.”. If I remember correctly, this is a feature that I didn’t enable for good reasons. This is the kind of tracking I don’t like. As above, I can do this on our test platform, but I hope this is not supposed to be the solution for our prod environment.While I was looking around to see if this new plugin helps, I thought of something else: Our testing environment is hidden and can only be accessed with credentials. We know that this sometimes causes problems when importing data that was exported from another WP environment. In this case here, we import data from the same database, right? But there seems to be some external process involved because … switching off this security feature actually solved the problem!!! I was able to import historical data and now I see statistics :):):)
So I don’t understand why, but in this case the problem was access from outside to our environment.
Thank you, @mosesmedh and @shahzeenfarooq for your support 🙂
I hope this thread will help other people facing the same problem.Hi @nullkohol
Thank you for following up and sharing what you discovered. It’s great to hear that you managed to resolve the issue by adjusting the access restriction on your test environment, and that historical data now imports correctly. Your note about the external access requirement will definitely be valuable for others who run into the same situation.
We appreciate you taking the time to document your findings and close the loop here. If WooCommerce has been useful for your store and you’ve found the support here helpful, we’d be grateful if you could leave us a quick 5-star review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post
Your feedback really means a lot to us!
Hi @lovingbro thanks for your kind words. That’s the least I can do for a software that I use for free 🙂 I already reviewed WC, so I cannot do it again I think 😉
Hi @nullkohol
Thank you for the quick follow up, and for the review you left a few days ago. I can see you already shared a 4-star review. If you would like to update it, just click the review link we shared earlier, it will take you to your existing review where you can edit it and change the rating to 5 stars if you wish.
Thank you for supporting WooCommerce and for sharing your findings with the community.
- 2025-08-14 19:05:16 +0000
The topic ‘Analytics / import historical data not working’ is closed to new replies.