This Help forum is for issues relates to the latest release (1.7). For issues related to development versions please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: Google Analytics with webtrees

Google Analytics with webtrees 2 weeks 2 days ago #1

  • rascal
  • rascal's Avatar
  • Offline
  • New
  • Posts: 17
Hello all,

i just tried to get google analytics working with my webtrees installation. Ofc i didn't manage it :(
I added my installation to google analytics, so that i get that UA-xxx number. I added this number to my webtrees installation in my /control panel/website/tracking and analytics/Google Analytics, and safed it ofc.
So far it doens't work :)
Below the Google Analytics site identification code in webtrees it shows me: "Tracking and analytics are not added to the control panel."
How do i add it to the controll panel?
Is this the problem why it doesn't work or is there something else i need to do.... add the google tracking code to the webtrees code? where do i add it? it should be right after the <head> tag, but i don't find it.

Is there another way to track the page?

thx for your help
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 2 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11741
> "Tracking and analytics are not added to the control panel."

Let me ask the question the other way...

How many administrators do you have on your site? Most sites have just one.

So, why do you need analytics to monitor when *you* use the control panel?
Surely you know exactly what you do already!


Analytics are only added to the genealogy pages, because that is where visitors come to your site, and that where there is useful information.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 2 days ago #3

  • rascal
  • rascal's Avatar
  • Offline
  • New
  • Posts: 17

Hey,
yea, that's what i want to do, i want to monitor my visitors.
How do i implement that?

maybe a pic makes clearer what i meant with "not in the controlpanel"
Last Edit: 2 weeks 2 days ago by rascal.
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 2 days ago #4

  • HRN
  • HRN's Avatar
  • Offline
  • Senior
  • Posts: 331
I think the meaning of the text "Tracking and analytics are not added to the control panel." can be misunderstood, or lost in translation.
Should maybe be changed to somthing like "Administration pages will not be traced by Google Analytics"
webtrees 1.7.16 at visitusinmaputo.com/webtree PHP 7.2.9 (Modules: vytux_cousins, vytux_pages, fancy_treeview, ancestral-fan-chart)
webtrees 2.0 dev on local WampServer PHP 7.3.1
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 2 days ago #5

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11741
If the "help text" is confusing, I will remove it...
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 2 days ago #6

  • rascal
  • rascal's Avatar
  • Offline
  • New
  • Posts: 17
Hey,
well, now that i know this, it's fine as it is (yes, it was a bit confusing, "Administration pages will not be traced by Google Analytics" would make it clearer i think)

netherless, i don't get that stuff working :(
In google analytics i added a new account with my homepage in it. I get this Tracking-ID "UA-xxxx" that i added to webtrees in the admin page.
It just doesn't work, analytics shows no traffic.

Analytics says, that i have to add the some code to every website i want to include right under the <HEAD> tag.
i have no clue tho, into what file i have to add this as i find no <HEAD> in the index.php.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-3"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-xxxxxxxx-3');
</script>
Last Edit: 2 weeks 2 days ago by rascal.
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 2 days ago #7

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11741
> It just doesn't work, analytics shows no traffic.

What is the URL of your site?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 1 day ago #8

  • rascal
  • rascal's Avatar
  • Offline
  • New
  • Posts: 17
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Google Analytics with webtrees 2 weeks 1 day ago #9

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11741
webtrees obeys the "Do not track" header.

(This is a setting that you configure in your browser).

If I visit your site with this setting, there is no analytics code.
If I visit your site *without* this setting, I see the analytics.

So, I guess your browser is configured to set "Do not track".
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Google Analytics with webtrees 2 weeks 1 day ago #10

  • rascal
  • rascal's Avatar
  • Offline
  • New
  • Posts: 17
Hey, you rule.
Yes, i turned that off and now it shows my visit.
thank you very much.
Btw, webtrees is an awesome piece of work, thank you very much for it.
The administrator has disabled public write access.
Powered by Kunena Forum