Announcement

Collapse
No announcement yet.

Migration from old Google Analytics to new Google Analytics 4 with Tag Manager

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Migration from old Google Analytics to new Google Analytics 4 with Tag Manager

    For many years, I have used Google Analytics to track the web cards viewed on my web site. To do that I added as a footer script to each web card crated by Reunion. With Google phasing out Analytics (in July 2023) to a new Analytics 4 with Tag managers, Google wants each web card to be encoded with a new script below the <head> element and just before the <body>. Their recommendation is to Install the Google tag manually. Below is the Google tag for my account.

    Copy and paste it in the code of every page of your website, immediately after the <head> element. Don’t add more than one Google tag to each page.[INDENT]
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-DSET5Y13ZV"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-DSET5Y13ZV');
    </script>
    [/INDENT]

    How can I program the Reunion Web Report generator to do so?

    Thanks

    Alain Farhi

    Reunion 13.0 built 221018
    Alain Farhi
    http://www.farhi.org

    #2
    You could do this pretty easily with BBEdit using Find and Replace...

    Open BBEdit and press Command-Option-f to open the Find Multiple screen

    Search for the folder containing all Reunion output files in the Other... button

    Find:

    <body

    Replace:

    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-DSET5Y13ZV"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-DSET5Y13ZV');
    </script>
    <body

    Click the Save to Disk button on the next dialogue and let it rip.

    Should only take a few seconds probably unless you have 10s of thousands of cards, then it might take serveral seconds...

    Roger
    Roger Moffat
    http://lisaandroger.com/genealogy/
    http://genealogy.clanmoffat.org/

    Comment


      #3
      Roger

      Thanks for your suggestion and methodology. I can also use it for all the html pages I have on the website. For the Reunion Webcards, I will have to regenerate them without the old Google Analytic footer and run your BBEEdit Find and Replace . I will keep posted how long it will take to process my 137, 250 web cards in 285 folders. Uploading them back to the website will surely take longer.

      BTW, I looked at your sites and am very impressed how you created these TNG front pages. I will write to you off ReunionTalk to hear some suggestions on how I can improve the old layout of farhi.org.
      Alain Farhi
      http://www.farhi.org

      Comment


        #4
        Is there any plan to update Reunion for compatibility with the new Google Analytics?
        The suggestion above seems somewhat cumbersome,

        Comment

        Working...
        X