Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Google Analytics Plugin
plugin code? which one?
Avatar
hirzel75 #1
Member since Dec 2007 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Google Analytics Plugin
Hallo,

I tried to install Google Analytics Plugin, but I have a problem: Which is the code to insert?

In details:

1. I set a new google analytics account and got the code, that is composed by SIX row

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "....";
urchinTracker();
</script>

2. I install the plugin and put the code in the main.php page of my monobook

<?php
if (file_exists(DOKU_PLUGIN.'googleanalytics/code.php')) include_once(DOKU_PLUGIN.'googleanalytics/code.php');
if (function_exists('ga_google_analytics_code')) ga_google_analytics_code();
?>3. I go to my ACL page, and would put the code, but it is very small form.

So, what do I have to do with the google six raw code? Where the mistake?


Bests,
Luca
chi #2
Member since Jun 2006 · 1851 posts · Location: Munich Germany
Group memberships: Members, Super Mods, Wiki Managers
Show profile · Link to this post
IMHO the google analytics plugins is kinda obsolete because you have to edit your template anyway - just put the google analytics code into the main.php inside the <head> </head> section and you'll be fine.
Please add [SOLVED] to the initial thread subject if you feel your question has been answered.
If my answer doesn't make sense maybe your question didn't either - just visit http://facepalm.org.
Avatar
kaktux #3
User title: Rumirrer
Member since Feb 2008 · 29 posts
Group memberships: Members
Show profile · Link to this post
i also wanted to try the google analytics plugin, but skipped this as i read your answer.

Also i tried to insert the google code by hand - but no success..
would be great if anyone can help.

What i did until now:
1. created a google analytics account for my site.
There the DokuWiki is under pagename.com/wiki/doku.php
2. as that didn´t work ("Please provide the URL of the site you would like to track" - says its invalid
i tried pagename.com/wiki - and that was fine with google
3. i inserted the Legacy Tracking Code
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = ".....";
urchinTracker();
</script>
into the main.php of monobook - just before the </head>
4. After uploading the modified main.php - pushing check status in google analytics still didn´t work.
- so i looked into the edot section of my website profile.
As i understood the conversion goal could be the problem - so i created one with /wiki/doku.php as goal url.
5. still didn´t work

i tried for several hours now - but i got no conclusion...
would be great if anyone could help

i use dokuwiki-2007-06-26b with monobook (Monobook for Dokuwiki - October 3, 2007).
Avatar
olschimke #4
Member since Feb 2010 · 4 posts
Group memberships: Members
Show profile · Link to this post
kaktux,

see this article:

http://en.seowiki.info/best_practices/seo_optimized_dokuwi…

Regards,

Mike
Avatar
Ollza #5
Member since Jun 2015 · 13 posts
Group memberships: Members
Show profile · Link to this post
Hi,
My footer.html doesn´t have <?php include(dirname(FILE).'/dwtb.html') ?> that is refered in the link. So were should i put the analytics script? If i open my footer.html it only contains a p tag.
Avatar
turnermm (Moderator) #6
Member since Oct 2009 · 4741 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
All of the above is very out-of-date.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Ollza #7
Member since Jun 2015 · 13 posts
Group memberships: Members
Show profile · Link to this post
Ok. Is there any non out-of-date alternative?
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4741 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
There are some templates that make a place for google analytics:
https://www.dokuwiki.org/start?do=search&ns=template&…

Do you have the current Dokuwiki--detritus?  You should probably start there before you use a current template.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
MilchFlasche #9
Member since Feb 2007 · 8 posts · Location: Taichung, Taiwan
Group memberships: Members
Show profile · Link to this post
Quote by turnermm on 2016-03-03, 15:19:
There are some templates that make a place for google analytics:
https://www.dokuwiki.org/start?do=search&ns=template&…

Do you have the current Dokuwiki--detritus?  You should probably start there before you use a current template.

Hi, is there any method to insert Google Analytics tag into regardless which template we use? (I do use bootstrap3, but I also hope to use Google Analytics with writr template, which does not support GA right now)
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-14, 01:42:50 (UTC +01:00)