Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Using Google Analytics

  Asked By: Travon    Date: May 10    Category: Sharepoint    Views: 1348

Does anyone know how to put the necessary javascript in all pages in
order to use Google analytics for SharePoint?

I used a CEWP to get stats on a couple web part pages, but I can't
imagine doing that throughout all pages on all sites and the portal.
Is there a simple(r) way to add in some javascript in ALL pages?

I thought maybe there would be a way w/in site definitions or
something, but I'm not IT and don't know how that works. If you tell
me, I can pass along the info to our IT folks!



4 Answers Found

Answer #1    Answered By: Laura Walker     Answered On: May 10

In ONET.XML, you can add  a reference to a JavaScript file. But modifying ONET.XML isn't recommended by Microsoft.

Answer #2    Answered By: Keenan Whitehead     Answered On: May 10

Guidelines to Centralize SharePoint Style/Script Customizations:

Answer #3    Answered By: Gopal Jamakhandi     Answered On: May 10

is there a way to add  script without using the CEWP? AllItems.aspx, for example, cannot host web  parts.

Answer #4    Answered By: Dameon Dejesus     Answered On: May 10

Yes, my post describes how to add  script from an instance page, to a direct-mode
page, to all pages  in a site  definition, to all pages in the entire farm.

However, the AllItems.aspx page IS a web  Part page and CAN host web parts. This
was an untested scenario when Microsoft released WSS v2 so it isn't supported in
the UI. Check out this post for how to add script to an instance of the
AllItems.aspx page:

Of course, there are also direct-mode pages on the file system in the 60 hive
that provide the template for the ghosted version of the list page. They can be
found in the site definition where the list is defined.

Didn't find what you were looking for? Find more on Using Google Analytics Or get search suggestion and latest updates.