Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
3 registered (id242, SteveS, Mike L), 24 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/21/10
Posts: 58
Top Posters (30 Days)
Ruben 61
SD 53
Gizmo 48
gliderdad 33
Dunny 21
driv 18
dbremer 16
Mark S 13
Stan 13
Iann128 11
Latest Photos
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Gizzo Marx
Topic Options
#234968 - 02/19/10 06:24 PM How to install Google Analytics in Ubb.threads 7.4.2?
SMA Offline
stranger
Registered: 02/19/10
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.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#234969 - 02/19/10 06:27 PM Re: How to install Google Analytics in Ubb.threads 7.4.2? [Re: SMA]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
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.
Top
#234970 - 02/19/10 07:00 PM Re: How to install Google Analytics in Ubb.threads 7.4.2? [Re: Rick]
SMA Offline
stranger
Registered: 02/19/10
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!
Top
#234971 - 02/19/10 07:36 PM Re: How to install Google Analytics in Ubb.threads 7.4.2? [Re: SMA]
Gizmo Online   cat

Registered: 06/05/06
Posts: 14904
Loc: Portland, OR; USA
Yeh, pasting into the footer how Rick suggested is how I do it on all of my forums...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#235084 - 02/23/10 02:41 PM Re: How to install Google Analytics in Ubb.threads 7.4.2? [Re: Gizmo]
SMA Offline
stranger
Registered: 02/19/10
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.
Top
#235739 - 03/24/10 08:08 PM Re: Plug-In Allows Google Analytics Opt-Out [Re: SMA]
Mitch P. Offline

old hand
Registered: 06/23/06
Posts: 825
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.
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Edit Post
by Bert
01:19 PM
A positive note
by SteveS
09:36 PM
How to locate links to particular site if they are only used in images?
by Conrad
02/10/12 09:41 PM
Pictures not displaying
by Marker23
02/09/12 10:04 PM
Issue with logging out constantly
by Flanuva
02/09/12 07:05 PM
Forum Stats
10213 Members
36 Forums
33667 Topics
180917 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image