product views are counted as abandoned carts
-
Hello there!
I’ve recently switched from Google Analytics to Matomo and I’m pretty happy with it, however I stumbled upon a strange bug(?).
Every time a product in my shop is viewed, it is automatically also counted as an abandoned cart which is not very helpful. 😉
Could you please look into this?
Thanks
MarcoThe page I need help with: [log in to see the link]
-
If you’re using speculative loading, can you switch to prefetch? The current version of Matomo for WordPress does not support prerendering. The next one, which should be out soon, will support it.
Thank you Dizzy.
I’ve tried it, but it did not make any difference. Also, the speculative loading is only available on Chromium-based browsers. However, I had the same issue testing with FireFox.
I see. The only time cart contents are tracked is when a change to the cart is made. Are you using any WooCommerce related plugins that might affect what happens to the cart or how the contents of a user’s cart is stored?
-
This reply was modified 11 months, 4 weeks ago by
dizzyatinnocraft.
I could imagine that it’s my theme which adds a lot of additional features. I’ll check with the devs.
So I did some testing and could figure out some things:
- It’s not the theme, as it happens with Storefront as well.
- I have turned off all plugins and reactivated them one after the other. I did that on my staging site first, which is identical in terms of the technical part, it just does not have all the products.
- I could isolate the “Fancy Product Designer” plugin to be responsible for the issue. When it is deactivated, product views are just counted as views, not as abandoned carts. The plugin let’s customers personalize the products as you might know from shops which allow customers to design their own shirts, etc.
- As soon as it is active, only the last viewed product is counted as an abandoned cart. Not all of them. When another products is viewed, the abandoned cart disappears from the one viewed before.
Now the question is, can you look into this or will I have to get in touch with the team of Fancy Product Designer?
@jackennilsen Thanks for narrowing down the suspects to one. Yes, we can look into this. I’ll reply when I’ve found something, hopefully later today.
@jackennilsen are you using any of fancy product designer’s extensions? Or just the base plugin?
@dizzyatinnocraft Just the base plugin.
@jackennilsen Nothing in the plugin’s code jumps out at me. Can you try doing the following:
- Replace the
/path/to/wordpress/wp-content/plugins/matomo/classes/WpMatomo/Ecommerce/Woocommerce.phpfile with https://github.com/matomo-org/matomo-for-wordpress/blob/7329d8e9cb5ed0044008cd91fa032cff92dd67c7/classes/WpMatomo/Ecommerce/Woocommerce.php - In your wp-config.php, add:
define('WP_DEBUG', true);define('WP_DEBUG_LOG', true);define('WP_DEBUG_DISPLAY', false);
before it says to stop editing. - Trigger the product view issue, then check the
/path/to/wordpress/wp-content/debug.logfile, and see what’s been added
?
@dizzyatinnocraft Of course. Here’s the result: https://pastebin.com/Kn2m4PyQ
Obviously All In One SEO seems to be the cause of the problem, so I absolutely don’t understand why disabling Fancy Product Designer on my staging site was successful.
@jackennilsen it looks like All In One SEO temporarily adds an item to the cart, calculates some things, then empties the cart. I’m not sure it should be doing that, since cart modifications modify the user’s session and are expected to result in side effects, but I’ll see if I can workaround this issue somehow. Though I haven’t been able to come up with a reliable solution yet.
-
This reply was modified 11 months, 3 weeks ago by
dizzyatinnocraft.
@jackennilsen can you try doing the following:
- replace the
/path/to/wordpress/wp-content/plugins/matomo/classes/WpMatomo/Ecommerce/Woocommerce.phpfile with https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/72abb023ad9060ab28e3940ebdc1c5d386bed71c/classes/WpMatomo/Ecommerce/Woocommerce.php - then check if the issue persists
?
@dizzyatinnocraft Looks good, issue is gone! 🙂 Thank you so much for the help.
Great! I’ll mark this issue as resolved. The solution will be included in the next release.
-
This reply was modified 11 months, 4 weeks ago by
The topic ‘product views are counted as abandoned carts’ is closed to new replies.