Add google analytics to SharePoint, SharePoint 2013 and SharePoint online (Office 365)

Intro

Google analytics can provide a very concise overview on how your website is doing. It generates nice reports and hosts clear reports.

It is also possible to use google analytics to track usage on an intranet site built on SharePoint, SharePoint 2013 or SharePoint online.

In this tutorial i will explain the steps to implement analytics to your SharePoint site.

 

Prerequisites:

  1. You need a google account
  2. You need permissions to edit (master)pages in SharePoint

Steps

In short:

  1. go to google.com/analytics to generate an analyticsID
  2. copy some code to the site you’d like to track

Not so short:

  • go to http://google.com/analytics
  • Create an account (see this as a group for the sites you track)
  • Add a new property (a new site to track)

google analytics

  • Retrieve the tracking-ID
  • Select the script provided (start at <script> and copy including </script>)
  • trackingID code
  • Open SharePoint designer and navigate to the masterpage folder.
  • Open the masterpage you are using for your intranet (in my case its Seattle)
  • Open and edit the .html version (the .aspx will be modified by SharePoint after editing)
  • scroll all the way to the bottom and look for the tag </body>find body tag
  • past the analytics code just above the </body> tag past analytics code
  • save the masterpage

Now the tracking data will be sent to google analytics. It may take some time before the results start to roll in but they will.

 

first resultsFirst results coming in after just a minute.

 

 

Hide the Recent tab in SharePoint Navigation

I have never liked the “Recent” tab in the SharePoint QuickStart navigation.

Hide Recent 1

So here is a way to hide it forever! We do this by editing the properties of the link in the navigation settings of the site. We will display the link to all members of a newly created group. The thing is that there are no members in that group (other than the farm administrator of course).

 

Step 1

Go into Site settings.

Hide Recent 2

Step 2

Open People and groups to create a new group

Hide Recent 3

 

Step 3

Switch the view to Groups

Hide Recent 4

 

Step 4

Click “New” to creat the new group.

Hide Recent 5

 

 

Step 5

Give the new group a name and enter a description.

Hide Recent 6

Shouldn’t it say Group Description or something?

Leave all settings default and click “Create”.

Step 6

Delete yourself from the group

Hide Recent 8

If you created the group logged in with the system administrative account the group will be empty. 

 

Step 7

Go into Site settings and Navigation

Hide Recent 9

And scroll down to Structural navigation

Step 8

Select the Recent heading and click on “Edit”

Hide Recent 10

 

Step 9

Edit the properties for this Heading.

Find the newly created group by clicking on the address book.

Hide Recent 11

Select “SharePoint Groups”

Hide Recent 12

Search, select, add and hit “OK”

Hide Recent 13

 

If all went well you should see this screen. Just click “OK”

Hide Recent 14

And now the Recent heading will be hidden.

Hide Recent 15

Add extra result types and properties to the advanced search page

Step 1

First open the advanced search page.
This page can be found at <sitecollection>/search/advanced.aspx Result types 1

Step 2

Edit the page

Result types 2

Step 3

Edit the webpart

Result types 3

Step 4

Open the builder window to edit properties

Result types 4

Step 5

Once in the builder window, select all contents by hitting CTRL-A and copy it with CRTL-C Result types 5

Step 6

Open Visual Studio (or any other editor) and create a new XML file. We are not going to save this file but pasting it into visual studio formats the text so it is outlined properly. Result types 6

Step 7

Remove the default header. (CTRL-A and DEL)

Result types 7

Step 8

And paste the XML from the webpart Result types 8

Looks much better doesn’t it?

Step 9

First we’ll create a new ResultType Select the “Documents” ResultType. Copy and past it at the end of the ResultTypes section.

Result types 9

Step 10

Rename “Documents”. In this case we are going to use “Manuscripts” Result types 10

Step 11

Next we’ll create a new property definition Result types 11

Step 12

Add the new Property Definition to the new ResultType Result types 12

Step 13

Copy all text and paste it back into the Builder window in SharePoint Result types 13 And click OK

Step 14

Click OK to save the changes to the Webpart and save the page.

Result types 14

Don’t forget to check in and publish the page.

Et voila!

Result types 15

Calculate week number in SharePoint

Add a calculated field column and use this formula:

 

=INT((Created-DATE(YEAR(Created-WEEKDAY(Created-1)+4),1,3)+WEEKDAY(DATE(YEAR(Created-WEEKDAY(Created-1)+4),1,3))+5)/7)

 

I have seen sites that use this formula:

=INT(([datecolumn]-DATE(YEAR([datecolumn]-WEEKDAY([datecolumn]-1)+4);1;3)+WEEKDAY(DATE(YEAR([datecolumn]-WEEKDAY(datecolumn-1)+4);1;3))+5)/7)

But in my case i had to get rid of the brackets [] and replace the semicolons ; with a comma ,

 

Why?

Beats me!

 

Give one user full control of another user’s mailbox in Office 365

To give yourself or another user full access to someone else’s mailbox in Office 365 you have to use powershell. It can’t be done online.

Mailbox access

In this example we are going to give Pieter full access to the mailbox of Danielle use this command:

Add-MailboxPermission Danielle@kops-ict.nl  -User  Pieter@kops-ict.nl -AccessRights FullAccess

Inbox access

As an alternative you can also give permissions to an inbox only

Here’s the code:

Add-MailboxFolderPermission -Identity Danielle@kops-ict.nl:\Inbox -User Pieter@kops-ict.nl -AccessRights Owner

 

For more detailed information, please refer below article:

Give an Administrator the Ability to Open and View the Contents of a User’s Mailbox(http://help.outlook.com/en-us/140/gg709759.aspx )

Open another user’s mailbox in Office 365

In Office 365 you can open another user’s mailbox. Here’s how.

Go to the outlook web access page. In the left column find your username and right click on it.

Instruction
Right click on your username

 

 

 

 

 

 

 

 

 

 

 

 

Then select “Other user’s inbox”

Select other user's inbox
Select other user’s inbox

 

 

 

 

 

 

 

 

 

 

 

In the dialog box that appears, enter the name of the desired mailbox or use the addressbook icon to do a full search.

Enter the name of the desired mailbox
Enter the name of the desired mailbox

 

 

 

 

 

And click OK. Now you will see the other user’s mailbox appear in the left column.

There's your other user's mailbox
There’s your other user’s mailbox

 

 

 

 

 

 

 

 

 

 

 

 

 

When you receive an error stating that you have no permission to open the inbox when you are sure it exists, you may need to get the right permissions from your administrator.

Not found or no permission
Not found or no permission

 

 

 

 

 

I also have an article that explains how to set the right permissions.

Read it here.