Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2016-01-09 04:25:52

adiyaref
Member
Registered: 2016-01-09
Posts: 7

Google Analytic

Please help me how do I put my google analytic script on fluxbb forum, I try to find body tag but I cannot find it. and where do I put this code <?php include_once("analyticstracking.php") ?>

Last edited by adiyaref (2016-01-09 04:37:45)

Offline

#2 2016-01-09 05:22:44

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: Google Analytic

adiyaref wrote:

Please help me how do I put my google analytic script on fluxbb forum, I try to find body tag but I cannot find it. and where do I put this code <?php include_once("analyticstracking.php") ?>

I can help you with this. I personally would recommend putting the code itself in your main.tpl file. The analytical file then wouldn't be an additional call on your system.

I have mine included right before my <pun_head> declaration:

<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', 'ENTER YOUR SPECIFIC ID HERE', 'auto');
  ga('send', 'pageview');

</script>

Last edited by TigerAero (2016-01-09 05:24:19)

Offline

#3 2016-01-09 05:57:35

adiyaref
Member
Registered: 2016-01-09
Posts: 7

Re: Google Analytic

it wont work this is what i did:

public_html/fluxbb/include/template -->main.tpl --> i put the script code right before <pun_head>

Offline

#4 2016-01-09 06:11:30

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: Google Analytic

adiyaref wrote:

it wont work this is what i did:

public_html/fluxbb/include/template -->main.tpl --> i put the script code right before <pun_head>

Did you put your unique ID in there? I put it in caps for you. wink Do you maybe have an ad blocker? Google Analytic is generally blocked by default.

Last edited by TigerAero (2016-01-09 06:25:47)

Offline

#5 2016-01-09 06:27:36

adiyaref
Member
Registered: 2016-01-09
Posts: 7

Re: Google Analytic

yes, but still wont work, How do I know ad blocker and how to remove it

Last edited by adiyaref (2016-01-09 06:28:32)

Offline

#6 2016-01-09 07:00:00

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: Google Analytic

adiyaref wrote:

yes, but still wont work, How do I know ad blocker and how to remove it

I don't know man but really it should be working for you. Can you link a page of your forum? It should really be there if you put it in your template file?

Offline

#7 2016-01-09 07:38:30

adiyaref
Member
Registered: 2016-01-09
Posts: 7

Re: Google Analytic

Ok, i really appreciate your help

Offline

#8 2016-01-09 08:09:35

adiyaref
Member
Registered: 2016-01-09
Posts: 7

Re: Google Analytic

( I am not allowed to post the link ), Finnaly I did but it shows in realtime only but the data that still zero it wont record the total of visitor. And also the online user not showing in the analytic chart

Offline

#9 2016-01-09 15:53:26

TheBritain
Member
Registered: 2015-12-20
Posts: 51

Re: Google Analytic

If it is showing real-time, it is recording stats. Personally, I use Piwik, but I put my tracking code right under the <title> tags in "header.php". For compatibility reasons, I am not recommending you start editing your php files. I have mangled and twisted FluxBB into something else; that's my excuse and I'm sticking to it. tongue

Last edited by TheBritain (2016-01-09 15:54:23)

Offline

#10 2016-01-09 21:55:58

adiyaref
Member
Registered: 2016-01-09
Posts: 7

Re: Google Analytic

You are really helpful, thanks so much, i wll remember your advise

Offline

#11 2016-08-02 10:41:00

mariawatson
New member
From: Houston, USA
Registered: 2016-08-02
Posts: 1

Re: Google Analytic

lots of thanks for this guides

Offline

Board footer

Powered by FluxBB