• Resolved risu89

    (@risu89)


    Hi,

    I have a LiteSpeed Cache on my website (settings based on https://websiteedu.com/litespeed-cache-settings/). Everything is perfect, with one exception – my Google Analytics doesn’t work at all. Yesterday, I added tracking code to <head> section. Just to be sure that everything is ok with it. I saw data in real time, after a while it stopped working and I don’t see that data today in my reports. I disabled LiteSpeed Cache and now everything works fine.

    I want to use LiteSpeed Cache but I need data from GA… What should I do? Could you please help me with that?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please provide the report number ?

    Best regards,

    Thread Starter risu89

    (@risu89)

    Hi,

    Report number – DXZLQYIP.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please activate LSCWP for moment ? I need to see the generated HTML code

    Best regards,

    Thread Starter risu89

    (@risu89)

    Hi,

    I turned it on.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    With LSCWP

    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-65607291-5"></script> <script>window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-65607291-5');</script>  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-158623761-1"></script> <script>window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-158623761-1');</script>

    without

    		  <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-65607291-5"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-65607291-5');
    </script>
    
    		  <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-158623761-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-158623761-1');
    </script>	

    the code is identical , I don’t see any reason why it went wrong.

    Could you please try reset LSCWP to default setting and see how it goes ?

    Best regards,

    Thread Starter risu89

    (@risu89)

    Hi,

    Well, I think that it is more complicated ?? When I noticed that problem with GA, I added tracking code to header.php (previously, it was implemented by plugin Header and Footer Scripts). It worked and I could see real-time data in GA. I checked GA next day (around 9 AM) and it wasn’t working at all. 24 hours have passed and I still don’t see data from that day in GA. Website changes a bit – small window with Facebook wasn’t visible and that strap at the bottom of the page (cookies policy) changes colors to basic version.

    I used Google Analytics Debugger to check if there was something wrong with GA script and everything was ok. I switched off two options in LSCWP (I found some recommendations on forum):
    – JS Combine ([5] – OPTIMIZE),
    – Instant Click ([A] – ADVANCED).
    But it didn’t worked. I couldn’t find any better solution so I asked here for help and switched off LSCWP. Currently, I see data in real-time and website looks normal. Do you think that “turning it off and on again” helped?

    I hope that it stays that way. But I’m not sure after my previous experiences :/
    With default settings everything was fine for very long time. If tommorow I won’t see data in GA, I will switch to default settings. Before that, should I let you know that there is a problem again?

    I really appreciate your help on this! Thank you!

    Thread Starter risu89

    (@risu89)

    The good old “turn off and on again” worked ??
    Thank you again!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Google Analytics & LiteSpeed Cache’ is closed to new replies.