• Hello all, first of all thanks for the nice plugin!

    I have problems with the plugin and wp-rocket.

    First, to check what could cause the error I have disabled all of the js and other possible optimization of wp-rocket but nothing works I still have problems.

    The problem:
    On safari only, when I am on a woocommerce category (from the wp-rocket cache) and I click on a product, and then I click on the safari back button, instead of staying on the woocommerce category, I am automatically (or automagically!) redirected to the product I just saw.
    Example: – I am on a category page (ie categoryA)
    – Click on a product (ie productA)
    – The productA page is loading right
    – Click on the safari back button
    – The categoryA page is displaying (as it should be)
    – THEN after 2-3 seconds, I am redirecting (without doing nothing) on the productA page

    What could happen ?

    Thanks in advance for the help!
    Best regards !

Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    I had a similar report here, the problem was that I do not have access to a Mac and I was not able to test this issue by myself.

    But I’ve found browserstack.com, perhaps with their service I can see what is happening in Safari that causes this behavior.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    I checked some WooCommerce sites I know with Safari on BrowserStack but I do not see this issue.

    What is the URL of your site?

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi

    Thanks a lot for the help !
    I have put the link of my website in my profile (You will go directly in a category and after that just clicking on a product and coming back should trigger the problem).

    Thanks a lot !!

    BR

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi,

    Were you able to test on my site ?

    If no, I had to disable your plugin on my website as this issue is too problematic. But I have created a pre production site for you to be able to test on it.
    I have updated the Link in my profile.

    Thanks again for the time and help !

    BR

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Thanks for letting me test this on your pre-prod site.
    I was now able to see this happening but for me, it only happened when I clicked on a variable product, not with simple products.

    Could you confirm this please? Do you see the same?

    Thread Starter amauryt

    (@amauryt)

    hello @duracelltomi,

    Thanks to you to help!
    In the meantime wp-rocket support was also asking for some testings and they asked me to deactivate completely their plugin. Maybe you tested it when it was disabled.

    As you are testing right now I have reactivated it and preloaded all the pages again.
    It is happening for all the products, even simple products (“carte cadeau” for example – if coming from the category).

    Thanks for the help,

    BR

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi BR,

    I am on vacation this week but I would like to spend some time to test this as this is the first time I was able to see this error by myself. Could you keep your test site running this week? That would help me a lot!

    Other reported that reverting back to v1.11.x solved the issue, so currently my best guess is that something happens in the product click event handler on list pages. Here I’ve added a code that stores a cookie for each product to prevent tracking the gtm4wp.productClickEEC (=select_item in GA4) event multiple times. This is what I will test first.

    Could you also test this site in Safari: vitaminnagyker.hu – it is a Hungarian WooCommerce site but I guess you will see where to click ?? With browserstack this site works for me in Safari and it is using the latest GTM4WP version. I wonder whether it works for you as well?

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi

    Thanks for the time and help. I am moving from one host to another but I will try to keep this environment up and running.

    the Hungarian site you mentionned doesn’t seem to have this problem, but it doesn’t seem to be served from the cache either.

    I have migrated my site to kinsta, and they use their own cache system (it is not wp-rocket) and the issue is the same with their cache. So there is something happening there that safari doesn’t like :/

    The preprod that I will keep running is with wp-rocket.

    Hope you will be able to detect what could cause that issue.

    Thanks again,

    BR

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi

    Where you able to check on this issue ?

    Thanks again for the time and help,

    BR,

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi

    I found something that is surely related (and it’s also happening on vitaminnagyker.hu) and still only on safari :
    – We are on a category page, we click on a product
    – We arrive on the product page
    – We click on the safari back button
    – We come back on the category page, BUT we now can’t click on this same product (the link is irresponsive)

    I think that’s what’s happening when no cache is involved, and when cache is involved it’s my issue (that we automatically coming back on the product)

    Hope it help you to fix that !

    BR

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi

    Were you able to identify the issue and if yes, do you know when you will be able to propose a fix for it ?

    Thanks again for the time and help,

    BR,

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    I am trying to reproduce the issue on my dev site:
    https://woo.gtm4wp.dev/

    I installed latest WP Rocket and activated the cache as well as minify and combine CSS and JS files but ’til now I can not see what I have seen on your test site. Could you open my dev site and test in in your Safari?

    Also, could you put back the link to your site again in your profile?

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi

    Thanks for the reply, I don’t have the issue on your dev site, but i’m wondering if the pages are served from the wp-rocket cache.
    Even on several attemps, I have never seen, when I inspect the response, the header x-powered-by: WP Rocket/3.9.0.5

    On my website the minify and combine CSS and JS files is deactivated, I have keep only the cache to have the less possible thing pollute this bug.

    Link on my preprod is in my profile, as I have changed my webhost, the url is another one but the bug is still present.

    Hope you will be able to identify the issue :/

    BR

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Thanks, what I see currently is that after hitting the back button on the product detail page, after getting back to the category page, the product click event is in the data layer:

    https://www.awesomescreenshot.com/image/10925899?key=9c48daab4a78f97516bbe2623e888e61

    Even more interesting: global variables set by the plugin on the category page are also preserved. This means that after hitting the back button, the previous page state is restored and not a new pageload is happening.

    Could you test one thing for me?
    Could you disable GA4 tags in the container (if this is the live container, could you clone it so that we can see what happens if there is no GA4 tracking the the container on this test site?)

    Thread Starter amauryt

    (@amauryt)

    Hello @duracelltomi ,

    Thanks for the reply.

    For the moment on my live site your plugin is deactivated this pb is too important :/, it’s why I hope for a fix soon ??

    I have deactivated GA4 tags on the container. It seem that the redirection is no more done after that, BUT the other pb described above is still there (we can’t no more click on the product we where).

    Thanks for the help hope it help you.

    BR

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Problem on safari with wp-rocket and gtm4wp’ is closed to new replies.