• Resolved willsbury

    (@willsbury)


    New to LS Cache and it has been a GAME CHANGER. Damn, it’s quick.

    But, it seems to have killed my Google Analytics and everything else contained in Google Tag Manager. GTM seems to be loading, but nothing is registering in Google Analytics.

    I’m 100% certain Google Analytics is set up properly via GTM and GTM is installed correctly. It was working until Saturday, when I installed LS Cache.

    I was reading about JS exclusions but I’m not quite sure how those work.

    I turned off all javascript optimization for now, but it doesn’t look like Google Analytics is working yet.

    I’ll take any tips y’all might have: listing GTM in the excusions (is it just gtm.js? Not sure how that works or if I have to put the full URL ….) or anything else you might suggest. GTM has Analytics, Facebook Pixel, Adwords tracking, Adwords phone swapping code, and a few other trackers in it, so it needs to work.

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

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

    (@qtwrk)

    Hi,

    I turned off all javascript optimization for now

    could you please try export current setting , reset to default and see how it goes ?

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m going to mark this topic “Resolved”, due to lack of activity.

    If you still need help, please feel free to re-open it.

    Best regards,

    Thread Starter willsbury

    (@willsbury)

    Hey, sorry, was moving offices over the weekend and I’m just now catching up.

    Verified that LS Cache is causing the issue, at least in its current config. When I disabled the plugin, Google Tag Manager works just fine.

    How do the exclusion settings work? Talking about these:
    https://docs.litespeedtech.com/lscache/lscwp/ts-optimize/#get-a-list:~:text=If%20you%20need%20to%20see%20the,selected%20file%20listed%20as%20Request%20URL.

    Do I just enter “gtm.js” to exclude tag manager’s javascript from the minification?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    minification should not work on external resources , or if you have localized that script ?

    and also if you export current setting and reset to default , does it work ?

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m going to mark this topic “Resolved” again, due to lack of activity.

    If you still need help, please feel free to re-open it.

    Best regards,

    @willsbury did you get gtag to work and if so how did you do it? Thank you for your time.

    Hi!
    Got the same problem (Google Analytics not working).

    Resolved it by changing a setting in the Page Optimization page.
    Set “JS Combine” to off and “JS Combine External and Inline” too.

    Cheers,
    Maxime

    Plugin Support Hai Zheng?

    (@hailite)

    Can you please try latest v3.6-rc12 w/ those options ON?

    Any progress on this issue?
    I’m using Cloudflare with LiteSpeed.

    I finally got my Google Tag Manager/Google Analytics setup working when I disabled both LiteSpeed cache and Cloudflare cache.

    I found this post on the LiteSpeed blog from 2018 which describes how to set up LiteSpeed with Cloudflare:
    https://blog.litespeedtech.com/2018/01/17/cloudflare-management-lscache/

    Is there a resource which describes how to add Google Tag Manager to a website which uses LiteSpeed and Cloudflare?

    Thanks
    Henry

    @henscu I just had this problem after the latest LiteSpeed update and found the issue under the Page Optimization settings on the Localization tab. Comment out the lines that contain google analytics & google tag manager and then clear your cache.

    Same problem here also.
    I think the soln given by @cgscomputers might just work. I did do the required changes and the google script shows up as given by google on all the pages. Will monitor and update again.

    I think I found the problem.
    You need to turn OFF the “Localize Resources” on Page Optimization [6] . Or just comment with ## on all Google Analytics and Tag Manager lines.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Broke GTM/G-Analytics?’ is closed to new replies.