SharePoint Online Integration
Integrating with SharePoint 0nline is doable. It takes a bit of setting up in the beginning, but once you’re done with that part, you can enjoy using Piwik PRO with SharePoint Online.
In this article, we will show you steps to make the integration possible. Read on.
SharePoint Online installation process
Steps from this section will be done only once per tenant. If you have already installed Piwik PRO, please proceed to the step: Enabling Piwik PRO for the site collection.
Configure the app catalog (essential)
- Log in to your SharePoint Online Tenant.
- The app catalog. If you don’t have the app catalog you need to create one.
- Go to the SharePoint admin center > Apps and App Catalog. In case you already have one, please skip this step.
- Tick Create a new app catalog site and press the OK button.
- Fill the inputs with the data you see below and press the OK button.
Install the Piwik PRO app in the app catalog
To upload app file to the app catalog, follow these steps:
- Navigate to the app catalog.
- Upload Piwik PRO app file.
- If you use the Modern Site collection please make sure that you upload an additional file that you received from your dedicated Account Executive or Support. The file is usually titled
Register Piwik PRO app in your tenant
To register the Piwik PRO app in your tenant, please follow these steps:
- Go to
AnySharePointWebsiteis the site collection where Piwik PRO will be installed or the root site collection.
- Fill the inputs with data shown below and click the Create button
- If everything went okay you will see this information: The app identifier has been successfully created.
Enabling Piwik PRO for the site collection
To enable Piwik PRO for the site collection you will have to follow two steps — select site collection and install Piwik PRO app.
Select the site collection
- Go to Site Collection and check if Piwik PRO is enabled.
- If you don’t have a site collection, create a new one by opening the SharePoint admin center and creating a new site collection.
Install the Piwik PRO app
- Go to Site content of the site collection.
- Click Add an app or New > App (depending on the UI version).
- Find Piwik PRO and click it to install.
- You’ll see pop-up app permissions. Click Trust it to proceed with the installation.
- For version older than 188.8.131.52, you’ll see the view like in the picture below.
- For version newer than 184.108.40.206, you’ll see the view like in the picture below and you’ll need to approve the installation.
- To approve the installation, click Find out why and you will proceed to the following screen.
- Click Request approval and the request button in the pop-up window.
- Now App needs to be approved in App Catalog (described in Application installation in App Catalog).
- The app catalog will look like in the picture below.
- Click Piwik PRO. This will open the approval window.
- Click the Approve button.
- Navigate back to Site Collection where the app should be installed.
- Go to Site content of the site collection. Click Add an app or New > app (depending on the UI version).
- Find Piwik PRO and click it to install.
- You’ll see a pop-up app permissions. Click Trust it to proceed with the installation. The installation process will take about 1 minute.
- If everything went okay you will see Piwik PRO app installed in the site content of the site collection.
Configuring Piwik PRO
- Go to Piwik PRO app via the Site contents menu. If there is no license here, the configured app will redirect you to License Page.
- Fill the input with the key and click Save or click Request trial.
- Click the Back to settings button.
Global or default settings
Piwik Instance address: example yourname.piwik.pro
Token Auth of Piwik Super User: to acquire this you need to log in to your Piwik PRO
instance as the Owner. Click the user icon (top right corner). Go to API section (left side
menu). Authentication token can be found in the User authentication group.
Default values from sections below Global allow setting default values for further
installations on other site collections.
After finishing configuration click the Save and then Back button to navigate to the Site collection settings.
Site collection settings
Site collection settings will be populated by default. Values can be set according to
requirements for each site collection.
Leaving the Site ID empty will cause creating a new Site in Piwik server. It’s possible to set
existing Site ID by clicking the pencil icon.
Goals can be created automatically when textbox values are empty or set manually by
clicking the pencil icon next to each goal.
To enable tracking tick the checkbox next to Tracking code enabled.
In case you registered the app with incorrect URL you will see the information like in the picture below.
Please follow the instruction below:
- We need to be able to connect to SharePoint Online via PowerShell so if you haven’t done
that before please go to https://msdn.microsoft.com/en-us/library/office/dn726681.aspx and from prerequisites step install:
- Microsoft Online Services Sign-In Assistant is installed on the development computer.
- Microsoft Online Services PowerShell Module (32-bit; 64-bit) is installed on the development computer.
- Use PowerShell to invoke:
- Go to
https://YourSite/_layouts/15/appprincipals.aspxand make sure that there is no Piwik
Pro there (if it does exist – please delete it)
- Go to
https://YourSite/_layouts/15/appregnew.aspxand add an app again with above
ClientId / ClientSecret /
Connect-MsolService Get-MsolServicePrincipal -ServicePrincipalName dd6a796d-1b8c-4211-8c25-5034890fc195 $appPrincipal = Get-MsolServicePrincipal -ServicePrincipalName dd6a796d-1b8c-4211-8c25-5034890fc195 Remove-MsolServicePrincipal -ObjectId $appPrincipal.ObjectId
This will remove our app registration and we can register app again.
- The App Domain should be set to piwikpro.azurewebsites.net
- The Redirect URI should be set to https://piwikpro.azurewebsites.net/