![]() If the "hack" actually works then I'll post here, and depending how many users use GA there may be a need to make the javascript module give an option to select the code placement location (not my call to make). It has far more relevance for a business-focussed site. I get more than enough contact with worldwide relatives without it. We will not be adding such code to webtrees itself, as there are too many alternative analytic options out there to consider favouring any one.Īlthough I have had the "old" GA running on my site (with no page load concerns), I personally don't find it to be particularly relevant or useful for a Family History web site. It is why that module was created by someone originally. If it is important to you to use GA in the header, then my recommendation would be that you personally (or with the help of a programmer) create a version of the webtrees add-on "Custom Javascript" that will do it for you, and hence avoid "hacking" the core code. If you are willing to handle that, then fine, you can go ahead.ĭo not even consider not upgrading at every release, for two reasons:ġ - we cannot (will not) spare the time or resources to support anything other than the latest version.Ģ - there is every possibility that all or any upgrade will include security fixes (we rarely publicise these), so not upgrading can open your site to unnecessary risk. 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). Just recently started using your software, and I'm very happy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |