• Resolved jackennils

    (@jackennilsen)


    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
    Marco

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    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.

    Thread Starter jackennils

    (@jackennilsen)

    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.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    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?

    Thread Starter jackennils

    (@jackennilsen)

    I could imagine that it’s my theme which adds a lot of additional features. I’ll check with the devs.

    Thread Starter jackennils

    (@jackennilsen)

    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?

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @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.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @jackennilsen are you using any of fancy product designer’s extensions? Or just the base plugin?

    Thread Starter jackennils

    (@jackennilsen)

    @dizzyatinnocraft Just the base plugin.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @jackennilsen Nothing in the plugin’s code jumps out at me. Can you try doing the following:

    1. Replace the /path/to/wordpress/wp-content/plugins/matomo/classes/WpMatomo/Ecommerce/Woocommerce.php file with https://github.com/matomo-org/matomo-for-wordpress/blob/7329d8e9cb5ed0044008cd91fa032cff92dd67c7/classes/WpMatomo/Ecommerce/Woocommerce.php
    2. 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.
    3. Trigger the product view issue, then check the /path/to/wordpress/wp-content/debug.log file, and see what’s been added

    ?

    Thread Starter jackennils

    (@jackennilsen)

    @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.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @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.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @jackennilsen can you try doing the following:

    ?

    Thread Starter jackennils

    (@jackennilsen)

    @dizzyatinnocraft Looks good, issue is gone! 🙂 Thank you so much for the help.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Great! I’ll mark this issue as resolved. The solution will be included in the next release.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘product views are counted as abandoned carts’ is closed to new replies.