How to integrate Google Analytics with Sapho version 3.9 or greater

Last update:

Important Notes

1. We recommend creating a dedicated Google account (for example, sapho@company.com) and then using it to set up the Google Analytics integration in Sapho. This account must have access to the analytics data/views that you want to download in Sapho.

2. If your internal server hosting Sapho is behind a firewall, you will need to allow access to hostname www.google.com with port 443, so Sapho can connect to Google Analytics.

Step 1: Sign in

Log in to www.accounts.google.com with the dedicated Google account.

Step 2: Create a Google API project

Go to the Google API console. Click the arrow next to Google APIs logo in the top bar.

ga1.png
 
On the popup, click the + button to create a new project.
ga2.png
 
Add a project name and click the Create button.
ga3.png

Wait a while until you are redirected to the new project.

Step 3: Create OAuth credentials

Go to the Credentials tab. Click Create Credentials and select OAuth Client ID.

ga4.png

You will be redirected to a new page. Click the Configure consent screen button.

ga5.png

Enter 'Sapho in the field called Product name shown to users. Then click Save at the bottom of the page.

ga6.png

You will be redirected to a new page. Set Application type to Web Application, enter 'Sapho' in the Name field, and set Authorized redirect URIs to https://auth.sapho.com/callback. Then click the Create button.

ga7.png

Step 4: Get the client credentials

A pop-up with your Client OAuth credentials will appear. Copy & paste the values in a secure place for later reference.

Step 5: Enable Google Analytics Reporting API

Go to the Library tab and search for Google Analytics Reporting API. Select it.

ga8.png

Hit the Enable button at the top of the page.

ga9.png

Step 6: Get Google Analytics View ID

Go to Account Explorer. Authenticate using the same dedicated Google account. Select Account, Property and View. View ID will be displayed below. Save this value in a secure place for later reference.

GA08.png

Step 7: Paste the credentials in Sapho

Paste the client credentials and the view ID in the input fields of the integration configuration form for Google Analytics in Sapho. Click Next.

Step 8: Log in with the dedicated Google account

Click Next.

Step 9: Finish the creation of the integration