Previous Thread
Next Thread
Print Thread
Hop To
Joined: Feb 2010
Posts: 3
S
SMA
Offline
stranger
stranger
S Offline
Joined: Feb 2010
Posts: 3
Hello,

I am trying to install our tracking code for google analytics on our official company forums.

I inserted this code into the bottom of "footer.tpl" above the </body> tag:
Code
<?php include_once("http://forums.sma-america.com/analyticstracking.php"); ?>

I then created a PHP file called "analytics.php" and placed it into the root directory. The analytics.php file has this code in it:
Code
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._trackPageview();
} catch(err) {}</script>

After waiting 48 hours, it still has no data from my traffic stats.

Is there something I am doing wrong? Do I even need the analytics.php file or can I just insert my GA code directly into the footer.tpl file? I tried inserting it into the footer.tpl file already, but also got no data on traffic...side note, I didnt wait 24 hours either.

Can someone tell me definitivley how to make this work?

Thank you very much!

BTW, I tried searching the forums first and found no relevant threads already.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
What might be happening is since you are referencing the include by the full domain name, your php install might not be configured to allow that, only direct paths.

So, what I'd do is just take out the include and then go into Display Options -> General -> HTML Includes and then paste your adsense code into the default footer. I believe you won't get any stats until after the following day, if I remember right.

Joined: Feb 2010
Posts: 3
S
SMA
Offline
stranger
stranger
S Offline
Joined: Feb 2010
Posts: 3
Perfect!

Thank you for the very fast response, i will update this thread when I start seeing stats that the Google Analytics is working per your method.

Thanks again!

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Yeh, pasting into the footer how Rick suggested is how I do it on all of my forums...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Feb 2010
Posts: 3
S
SMA
Offline
stranger
stranger
S Offline
Joined: Feb 2010
Posts: 3
To both,

This worked perfectly.

Thank you for your assistance, I now have all my stats!

Again, thank you for your superb support.

Joined: Jun 2006
Posts: 811
old hand
old hand
Joined: Jun 2006
Posts: 811
Everyone following the latest with Google Analytics?

Plug-In Allows Google Analytics Opt-Out

By: Anil Batra
2010-03-22

Late last week Google Analytics announced a browser plug-in that will allow users to opt-out of Google Analytics tracking. Here is an offical statement from Amy Chang...

...group product manager at Google Analytics:

As an enterprise-class web analytics solution, Google Analytics not only provides site owners with information on their website traffic and marketing effectiveness, it also does so with high regard for protecting user data privacy. Over the past year, we have been exploring ways to offer users more choice on how their data is collected by Google Analytics. We concluded that the best approach would be to develop a global browser based plug-in to allow users to opt out of being tracked by Google Analytics. Our engineers are now hard at work finalizing and testing this opt-out functionality. We look forward to make it globally available to our users in the coming weeks.

How does it impact the website stats reported by Google Analytics

This is the biggest question everybody is asking. Since I don't have the full information on how this plug-in will exactly work, let's take a look two potential ways this plug-in can work.

• The plug-in will not collect any sort of data for the user
Let's assume that this plug-in will ensure that absolutely no data about the users behavior on any of the site that user visits will be collected. Which means that Google Analytics will complelty ignore the presence of that person (computer) as if that person never visited the site. In that case all of the data, i.e. visitors, visits and page views, conversion etc., will be under reported.

• The plugin will collect the data but then destory the cookie after every session (visit)
In this case, a session level cookie will still work but this cookie will be removed from the users computer after every session. This will result in the accurate count of visits (sessions) and page views and all the data that is reported at visit or page view level. However, the visitors count will be inflated since same person (computer) will get a new cookie for every visits.

How big the impact will be?

Well, it is not clear how widepeard the use of this plug-in will be. Currently, there are 3rd party tools available clear or block Google analytics cookies but the use of such tools do not seem to be an issue for Google Analytics tracking. So I wonder if this plug-in will have any huge impact on Google Analytics data. However keep in mind that there will be some impact.



Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
0 members (), 744 guests, and 147 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)