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

Intro

Google ana­lyt­ics can pro­vide a very con­cise overview on how your web­site is doing. It gen­er­ates nice reports and hosts clear reports.

It is also pos­si­ble to use google ana­lyt­ics to track usage on an intranet site built on Share­Point, Share­Point 2013 or Share­Point online.

In this tuto­r­i­al i will explain the steps to imple­ment ana­lyt­ics to your Share­Point site.

 

Prerequisites:

  1. You need a google account
  2. You need per­mis­sions to edit (master)pages in Share­Point

Steps

In short:

  1. go to google.com/analytics to gen­er­ate an ana­lyt­ic­sID
  2. copy some code to the site you’d like to track

Not so short:

  • go to http://google.com/analytics
  • Cre­ate an account (see this as a group for the sites you track)
  • Add a new prop­er­ty (a new site to track)

google analytics

  • Retrieve the track­ing-ID
  • Select the script pro­vid­ed (start at <script> and copy includ­ing </script>)
  • trackingID code
  • Open Share­Point design­er and nav­i­gate to the mas­ter­page fold­er.
  • Open the mas­ter­page you are using for your intranet (in my case its Seat­tle)
  • Open and edit the .html ver­sion (the .aspx will be mod­i­fied by Share­Point after edit­ing)
  • scroll all the way to the bot­tom and look for the tag </body>find body tag
  • past the ana­lyt­ics code just above the </body> tag past analytics code
  • save the mas­ter­page

Now the track­ing data will be sent to google ana­lyt­ics. It may take some time before the results start to roll in but they will.

 

first resultsFirst results com­ing in after just a minute.

 

 

Hide the Recent tab in SharePoint Navigation

I have nev­er liked the “Recent” tab in the Share­Point Quick­Start nav­i­ga­tion.

Hide Recent 1

So here is a way to hide it for­ev­er! We do this by edit­ing the prop­er­ties of the link in the nav­i­ga­tion set­tings of the site. We will dis­play the link to all mem­bers of a new­ly cre­at­ed group. The thing is that there are no mem­bers in that group (oth­er than the farm admin­is­tra­tor of course).

 

Step 1

Go into Site set­tings.

Hide Recent 2

Step 2

Open Peo­ple and groups to cre­ate a new group

Hide Recent 3

 

Step 3

Switch the view to Groups

Hide Recent 4

 

Step 4

Click “New” to cre­at the new group.

Hide Recent 5

 

 

Step 5

Give the new group a name and enter a descrip­tion.

Hide Recent 6

Should­n’t it say Group Descrip­tion or some­thing?

Leave all set­tings default and click “Cre­ate”.

Step 6

Delete your­self from the group

Hide Recent 8

If you cre­at­ed the group logged in with the sys­tem admin­is­tra­tive account the group will be emp­ty. 

 

Step 7

Go into Site set­tings and Nav­i­ga­tion

Hide Recent 9

And scroll down to Struc­tur­al nav­i­ga­tion

Step 8

Select the Recent head­ing and click on “Edit”

Hide Recent 10

 

Step 9

Edit the prop­er­ties for this Head­ing.

Find the new­ly cre­at­ed group by click­ing on the address book.

Hide Recent 11

Select “Share­Point 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 head­ing will be hid­den.

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 web­part

Result types 3

Step 4

Open the builder win­dow to edit prop­er­ties

Result types 4

Step 5

Once in the builder win­dow, select all con­tents by hit­ting CTRL‑A and copy it with CRTL‑C Result types 5

Step 6

Open Visu­al Stu­dio (or any oth­er edi­tor) and cre­ate a new XML file. We are not going to save this file but past­ing it into visu­al stu­dio for­mats the text so it is out­lined prop­er­ly. Result types 6

Step 7

Remove the default head­er. (CTRL‑A and DEL)

Result types 7

Step 8

And paste the XML from the web­part Result types 8

Looks much bet­ter does­n’t it?

Step 9

First we’ll cre­ate a new Result­Type Select the “Doc­u­ments” Result­Type. Copy and past it at the end of the Result­Types sec­tion.

Result types 9

Step 10

Rename “Doc­u­ments”. In this case we are going to use “Man­u­scripts” Result types 10

Step 11

Next we’ll cre­ate a new prop­er­ty def­i­n­i­tion Result types 11

Step 12

Add the new Prop­er­ty Def­i­n­i­tion to the new Result­Type Result types 12

Step 13

Copy all text and paste it back into the Builder win­dow in Share­Point Result types 13 And click OK

Step 14

Click OK to save the changes to the Web­part and save the page.

Result types 14

Don’t for­get to check in and pub­lish the page.

Et voila!

Result types 15

Calculate week number in SharePoint

Add a cal­cu­lat­ed field col­umn and use this for­mu­la:

 

=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 for­mu­la:

=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 brack­ets [] and replace the semi­colons ; with a com­ma ,

 

Why?

Beats me!

 

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

To give your­self or anoth­er user full access to some­one else’s mail­box in Office 365 you have to use pow­er­shell. It can’t be done online.

Mailbox access

In this exam­ple we are going to give Pieter full access to the mail­box of Danielle use this com­mand:

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

Inbox access

As an alter­na­tive you can also give per­mis­sions 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 infor­ma­tion, please refer below arti­cle:

Give an Admin­is­tra­tor the Abil­i­ty to Open and View the Con­tents of a User’s Mail­box(http://help.outlook.com/en-us/140/gg709759.aspx )

Open another user’s mailbox in Office 365

In Office 365 you can open anoth­er user’s mail­box. Here’s how.

Go to the out­look web access page. In the left col­umn find your user­name and right click on it.

Instruction
Right click on your user­name

 

 

 

 

 

 

 

 

 

 

 

 

Then select “Oth­er user’s inbox”

Select other user's inbox
Select oth­er user’s inbox

 

 

 

 

 

 

 

 

 

 

 

In the dia­log box that appears, enter the name of the desired mail­box or use the address­book icon to do a full search.

Enter the name of the desired mailbox
Enter the name of the desired mail­box

 

 

 

 

 

And click OK. Now you will see the oth­er user’s mail­box appear in the left col­umn.

There's your other user's mailbox
There’s your oth­er user’s mail­box

 

 

 

 

 

 

 

 

 

 

 

 

 

When you receive an error stat­ing that you have no per­mis­sion to open the inbox when you are sure it exists, you may need to get the right per­mis­sions from your admin­is­tra­tor.

Not found or no permission
Not found or no per­mis­sion

 

 

 

 

 

I also have an arti­cle that explains how to set the right per­mis­sions.

Read it here.