Google Analytics

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
jaky
Posts: 82
Joined: Mon Mar 07, 2005 12:12 pm
Location: 43850 , Cambrils (Spanien)
Contact:

Google Analytics

Post by jaky »

Hallo und guten Abend.

Ich suche eine Lösung Google Analytics ein zu binden.

Könnte mir jemand die Datei benennen?

Habe schon mehrfach was versucht und nur Fehlermeldungen bekommen.
Gruß
Jaky

Im Einsatz: phpMyFAQ http://www.faq-plus.eu
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Google Analytics

Post by Thorsten »

Hi,

einfach am Ende der template/default/index.tpl einbinden.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jaky
Posts: 82
Joined: Mon Mar 07, 2005 12:12 pm
Location: 43850 , Cambrils (Spanien)
Contact:

Re: Google Analytics

Post by jaky »

Super.

Funktioniert erste Klasse!

Danke!!
Gruß
Jaky

Im Einsatz: phpMyFAQ http://www.faq-plus.eu
bimandika
Posts: 4
Joined: Mon Nov 16, 2015 7:47 am

Re: Google Analytics

Post by bimandika »

Hi, Thorsten

Just this script

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'xxxx'', 'auto');
ga('send', 'pageview');

</script>


Or i must make a file analyticttracking.php and put this <?php include_once("analyticstracking.php") ?> in the end of template ?

Thanks
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Google Analytics

Post by Thorsten »

Hi,

Including a PHP file won't work. Just put the JavaScript code at the end of the index.tpl file.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bimandika
Posts: 4
Joined: Mon Nov 16, 2015 7:47 am

Re: Google Analytics

Post by bimandika »

Hi, Thorsten

its works, i put in the begining of body

Appreciated for your great works
scape
Posts: 201
Joined: Tue Apr 08, 2003 1:16 pm

Re: Google Analytics

Post by scape »

Hallo. Ich habe es sowohl am Ende (vor dem abschließenden Body-Tag) als auch direkt nach dem einleitenden Body versucht.

Seltsam ist, dass der Code im Quelltext nicht einmal ausgegeben wird. Den Cache habe ich bereits gelöscht und alle Pfade kontrolliert, damit ich auch die richtigen Files bearbeite.

Findet Ihr den Analytics-Code UA-117438-20 im Quelltext von http://faq.schwitzen.com :?: :oops:
Ich nehme an, dass ich da gerade einen totalen Hirnausfall habe oder es gibt irgendwo noch einen Cache den ich deaktivieren oder erneuern muss. Aktuell habe ich aber keinen Plan.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Google Analytics

Post by Thorsten »

Hi,

in welcher Datei hast du den Code eingefügt? Ich sehe ihn nicht.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
scape
Posts: 201
Joined: Tue Apr 08, 2003 1:16 pm

Re: Google Analytics

Post by scape »

Problem behoben! Wir hatten noch einen Template-Ordner auf der obersten Ebene.
Nachdem wir die index.tpl im Ordner assets > template entsprechend bearbeitet haben läuft es nun.

Gibt es weitere Ordner, die mit den letzten Versionen verschoben wurden?
Unsere aktuelle Ordnerstruktur lautet…

admin
assets
attachments
config
feed
font
images
inc
install
lang
multisite
services
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Google Analytics

Post by Thorsten »

Hi,

das passt so!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply