I’m circling back to this as my previous attempts were unsuccessful, and AWSTATS had satisfied most requirements. Anywho, I have a few sites that want G4 Analytics, and I am stumped. I appreciate guptast and ben’s advice, and I think guptast was trying to steer me in the right direction, alluding to the server-side rendering of meta tags; that process seemed straightforward and was accomplished a while back.
From what I’ve gathered, adding the G4 script is to be done through the DOM panel on the main.ejs page, which I’ve done, and G4 doesn’t recognize the property. I’ve tried adding the script as “source” and through the “text” field. It’s clear that the above is wrong, and I would appreciate any guidance. Adding through the "source’ or the text field produces the following:
As @Teodor has explained, you need to copy and paste similar to the following code in all of the pages that you want to track. If you are using Node, then only the layout page needs to have the code installed.
Google suggests putting this in the <header>, while I have suggested to place it at the bottom of the page to speed up the rendering.
Ben, thank you for your reply; you are the best. I have one down and two to go! For whatever reason, I convinced myself I had to insert the script in either the source or text field, which wasn’t working! I’m on the right path now; many thanks.