BuddyDev

Search

[Resolved] Problem with site-header-row-main not refreshing when google analytics is used

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #30119

    Hello there,

    I am using the Community Pro Builder theme with a child theme. The issue I am having is that when I am placing the Google code on the theme Customize “Customizing ▸ Advance Settings Custom Scripts & Styles” on “Custom Footer Scripts?” The top bar is still shows the “Register” and “Login” button after I have login into the site.
    How can we solve this, as we can not track the site from google analytics with this issue!


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

    gtag('config', 'UA-157010865-1');
    </script>

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #30120
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #30154

    Hi Sotiris,
    I am sorry for the inconvenience.

    I do not see any issue like that when logged in.

    It might have been a temporary cache. Can you please recheck?

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #30157

    Hi Brajesh,
    I did not have the google analytics code in place. That is why you could not see the error.
    Please try again now.

    • This reply was modified 4 years, 7 months ago by Sotiris.
  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #30161

    Hi,

    Thank you.

    I can see the issue. I am unable to find any reason. Caching seems to be the only plausible reason.

    Can you please temporarily disable APCu backend for the WP Object Cache.(It is present on the site as dropin) and check it.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #30162

    I have just delete the APCu file (object-cache.php) for the caching. But still nothing.

    • This reply was modified 4 years, 7 months ago by Sotiris.
  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #30164

    Hi Sotiris,
    I tried searching the issue and It seems that corrupted Google analytics/tag manager can cause it too.

    https://in.godaddy.com/community/Managed-WordPress-Hosting/EMPTY-CART-30sec-cache-issue-on-Cart/m-p/129036#M3044

    Can you please check it and see if it does not happen for a new property?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #30165

    To be honest, I am not sure what is causing it. Since you have a managed hosting, can you please contact support and ask if they know it.

    It is not a theme issue as we do not cache any part of the theme. The most probably reason for me is caching.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #30199

    Hello Brajesh,

    I finally find a way to solve the issue. I am not sure what exactly cause it, but it was definitely related to the Google Gtag code of analytics. I change the code from GTag to pure analytics.js and the problem is no longer there.

    Thank you for your help and assistant.

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #30220

    Hi Sotiris,
    Thank you for sharing the solution.

    I am glad it is resolved.

    Regards
    Brajesh

The topic ‘ [Resolved] Problem with site-header-row-main not refreshing when google analytics is used’ is closed to new replies.

This topic is: resolved