Installing Google Analytics

This post has 13 Replies | 7 Followers

Not Ranked
Posts 4
Points 95
markvw Posted: Wed, Jul 19 2006 9:30 AM
I am attempting to install Google Analytics on the Community Server portion of our site, but I am unable to locate where the FooterTemplate is located. Can anyone point me in the right direction?
  • | Post Points: 65
Top 25 Contributor
Posts 2,114
Points 27,480
MVPs

The best way to do this is to use Raw Header feature of CS.

Just go to Control Panel/Settings/Site Name & Description/Raw Header and copy/paste the code Google gives you and save it.  This code will be added to all of your pages.

  • | Post Points: 20
Top 25 Contributor
Posts 1,585
Points 21,065
The footer is in code, due to licensing for the EULA image.
 
Instead, look at the Masters.ascx page and other master pages in /Themes/default/Masters/
 
Just add your code under the Footer control there.  Smile
 
<markvw> wrote in message news:539020@communityserver.org...
I am attempting to install Google Analytics on the Community Server portion of our site, but I am unable to locate where the FooterTemplate is located. Can anyone point me in the right direction?

http://communityserver.org/forums/thread/539020.aspx


Eric "DT" Duncan - .NET :: Shot who?
Senior Support Engineer/ Applications Engineer

»telligentsystems
Exceptional Service. Predictable Results.

Disclaimer: TSS (Telligent Support Services) can only guarantee a response from this post if it was made to a Gold Support forum here at cs.org.
Eric "DT" Duncan - .NET :: Shot who?

  • | Post Points: 20
Not Ranked
Posts 4
Points 95
markvw replied on Fri, Jul 21 2006 3:06 PM
I assume you are talking about signing into the administrator's portion of the site and using that control panel. But I do not have anything named "Site Name & Description" listed.
  • | Post Points: 5
Not Ranked
Posts 4
Points 95
markvw replied on Fri, Jul 21 2006 3:08 PM
I found the Master.apsx where you said it was and added the script. None of the other master themes had any </body> section, which is where Google instructs me to put the code. I did View Source in my browser and found a reference to CommonFooter, but have not been able to find any such page in the file.
  • | Post Points: 20
Top 25 Contributor
Posts 2,060
Points 28,215
CS Developers
alowe replied on Wed, Aug 2 2006 1:05 PM

I would NOT modify pages, skins, etc. for this.

Login as an admin. Go to the Control Panel. Click the "Administration" link in the Control Panel. On the left side bar navigation click "Settings". From the menus that show up when the Settings menu expands, click "Site Name & Description". You will see a "Raw Header" field on the form. Place your Google Analytics code there.

This is how we do it on communityserver.org. 

-Alex
  • | Post Points: 20
Top 25 Contributor
Posts 2,114
Points 27,480
MVPs
Actually I had pointed to Raw Header at first reply but Eric started this infinite loop Big Smile
  • | Post Points: 5
Top 100 Contributor
Posts 205
Points 2,890
haathi replied on Wed, Nov 8 2006 1:04 AM
Here is a post I've written that shows you how to add Google Analytics to your Community Server Site.

haathi featuring a blog..

  • | Post Points: 20
Not Ranked
Posts 4
Points 65

Hi,

Inserting the google analytics code into raw header doesnt work on my site, google says they arent receiving data.

 Any other ideas?

I noticed that google says it has to be right before the </body> tag and CS raw header does it like this:

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

 i removed my uid and replaced with xxx

 

  • | Post Points: 5
Not Ranked
Posts 10
Points 185
tuitionu replied on Mon, Oct 1 2007 12:56 PM

I am not sure why Telligent recommends adding any analytics script to the header. This can slow down the load of your site if it is at the top. If it was placed at the bottom of your page then at least your whole page will load faster and if there are any issues with google analytics speed then just the footer will load slow.

 I always put tracking code at the bottom and I think it would be a great idea for CS2008 to make it easy to add google analytics and any other tracking code to the footer of the pages.

Top 500 Contributor
Posts 67
Points 1,110

Great suggestion, Tuitionu. I will vote for this improvement too!

I use several tracking codes, and I agree that best practice will be to put the code at the bottom of the page.

Hope Telligent agrees...

Henrik Dahl www.portugalnyt.dk - A Community Server 2007 site about Portugal.

Not Ranked
Posts 10
Points 110
sowacs replied on Fri, Feb 8 2008 1:36 PM

FYI, you can use the site's "Copyright notice" setting for your analytics script.  As it stands, since that's only a text box (not a text area), you also have to change the script so that it's on one physical line along with any copyright text.  If you are using more extended code, just put it in another file, save it in a web accessible place, and reference this file in the script tag's src attribute.

Also, there's a drawback to placing the code in the header in addition to the performance hit at an undesirable time in the page load process: the script gets parsed & run before the title tag is parsed (in CS2007.1), resulting in empty GA "Content by Title" results - all page names are reported as "(not set)".

There is a content placeholder after the form end tag and just before the body end tag with id="outsidetheform" that appears not to be used anywhere; getting that or something like it hooked up & exposed through settings somewhere would seem appropriate for this and other uses.

Top 500 Contributor
Posts 67
Points 1,110

Thanks for clarifying the issue regarding Google Analytics and the empty "Content by title" results. I had noticed this problem too.

It is also a nice trick to use the "Copyright notice" for scripts - however I still think that Telligent should implement a field for scripts placed just above the </body> tag as advised by all analytics systems.

I totally agree that placing scripts in the header is not a good solution. Hosting a site in Europe with Google scripts (from American servers) in the header slows a site significantly.

Henrik Dahl www.portugalnyt.dk - A Community Server 2007 site about Portugal.

Top 10 Contributor
Posts 3,104
Points 46,085
TelligentSupportTeam

Sucha an option exists in C2008 (currently in beta).

  • | Post Points: 5
Page 1 of 1 (14 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com