Results 1 to 4 of 4

Thread: Google Analytics NOF15 uses legacy code

  1. #1
    Junior Member
    Join Date
    May 2015
    Posts
    27

    Default Google Analytics NOF15 uses legacy code

    Google says that we should be using their newer analytics code that uses analytics.js library instead of ga.js library.

    NOF15 puts the old ga.js code in when you select enable Google Analytics.

    Is their any way to easily implement this in NOF15? I don't think I'd want to have to manually enter it on each page, unless that is the only way. If it is the only way, how would I do it? The instructions for NOF13 of how to do this don't seem to be right.

    https://developers.google.com/analyt...llection/gajs/

    Thanks!

  2. #2
    Junior Member
    Join Date
    May 2015
    Posts
    27

    Default

    I think I found the answer to my question partially answered in an old post here.

    I went to the file ga.js under Program Files (x86) < NetObjects < NetObjects Fusion 2015 < NetObjects System < Resources < js < analytics

    I opened ga.js in notepad (run as administrator) and changed it to the new code:

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

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

    My google account number after the "UA-" was automatically filled in, in both locations. I'm pretty sure this did the trick!

  3. #3
    Senior Member gotFusion's Avatar
    Join Date
    Jan 2010
    Location
    www.gotHosting.biz
    Posts
    4,529

    Default

    The file you edited in notepad will get overwritten with the old/obsolete code the first time you generate a single page.

    Use the masterborder insert option to place the new code on all pages

    You will need to generate and update all pages to have the code on all of them after inserting it in one location.

    Don't forget to uncheck the Fusion option to create the code otherwise you will have BOTH,
    NetObjects Fusion Cloud Linux enabled Web Hosting, support + training starts at $14.95
    NetObjects Fusion web Hosting and support + ASP + PHP + ColdFusion + MySQL + MS SQL
    FREE NetObjects Fusion Support & training comes with all web hosting accounts
    NetObjects Fusion Web Hosting: http://www.gotHosting.biz

  4. #4
    Junior Member
    Join Date
    May 2015
    Posts
    27

    Default

    So far the file I edited in notepad has not been overwritten and I have published the site several times. Hopefully it continues to stay this way...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •