Webtrees google analytics11/19/2023 Every upgrade WILL wipe your modification, requiring you to replace it. We aim to update webtrees regularly and often (on average a new release every 6 weeks or so). To do that, you can put it in /library/WT/Controller/base.php, function pageHeader().īUT, that information has to come with a health warning. However, that suggestion does make sense. Once you find the code snippet, copy and paste it into your web page, just before the closing tag I would be delighted if I am on the wrong track here. It would be good to know if others are getting full functionality (the new functionality that is) with it in the footer. I am happy to experiment and report back if it works properly/differently. Thanks again if you can help me locate the file that generates the tag I need to locate. As webtrees appears to rely almost solely on php, it looks like the "advanced" tracking code option is needed, and as soon as you tick "php" you get the advice I put in my original post (the actual tracker code stays the same). It looks like the browser needs to load the tracker earlier in order to give full functionality. The advice for the latest version is found here (linked from the page you sent): The link you put above is for the "traditional" tracker (Google speak for "the old version"). The advice from Google looks quite consistent to me for php pages on their latest async tracker. Are the timing stats working for you, even with the tracking code in the footer? My thought process was running such that the browser would need to see that script load early as it parsed the page in order to tell it that it needed to report the load timings (and justifying why Google advised putting where they do). Only, the page load times are not working for me. I understand you when you say it works, and it is partially working for me. I'm guessing I may have to edit several files if it is located in the themes (or reduce the number of themes), but I am happy to do this. Please can someone tell me which file(s) in webtrees generates the opening tag. It's probably the reason why the tracking code is partially working, but I don't get any page load timing statistics etc. I notice that the latest "Custom Javascript" module works, but it inserts the tracking code in the wrong place (footer). Then, add the following line to each template page immediately after the opening tag: " "For any PHP pages, put the following code in a file (for example, analyticstracking.php) and upload it to your site. ![]() I notice that your software uses php almost entirely, and hence in order to embed the Google tracking code as per the advice from Google (for php) here is what they write: I have what I think will be a quick and easy question to answer (I searched, by didn't find in the forum). So, while both Google Analytics code snippets will populate your GA account some people may prefer to stick with Universal Analytics.Just recently started using your software, and I'm very happy. By default, Google now includes the new gtag.js script in the Tracking Code section (under Admin > Property Settings) but the GA4 layout is different (see screenshot). ![]() I would suggest updating the webtrees Google Analytics module to include a checkbox to the effect 'Do you wish to use the new Google Analytics gtag.js code?' This would give webtrees users the option to continue to use Universal Analytics or the new gtag.js code. (Setting up a new GA Property means data only starts flowing in to the associated Views from the date the new Property is created). Most people are going to use the same Account ID in order to ensure their GA data continues uninterrupted. ![]() You can use the same GA Account ID, although you can user a new code if you prefer which would generate a new GA Property. The new code snippet is a straight slot-in replacement for the old Universal Analytics code snippet. I'll raise an issue on Github, although it's not a bug more an update to the latest Google Analytics script.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |