Google Analytics code

Home Forums WordPress Theme Support BfastMag Pro Google Analytics code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8969
    Raja CRN
    Keymaster

    Hello,

    We’ve provided the inline scripts text area. But you have added the external scripts with script tag. Use this code in text area.

    var s = document.createElement("script");
    s.type = "text/javascript";
    s.src = "https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID";(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(s);
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments)};
    gtag('js', new Date());
    gtag('config', 'GA_TRACKING_ID');
    #8970
    leegvincent
    Member

    Thanks very much 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

Only Verified Customer of this Theme Can post reply to this Support Topic! .