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)

  1. Log in to your SharePoint Online Tenant.
  2. The app catalog. If you don’t have the app catalog you need to create one.
  3. Go to the SharePoint admin center > Apps and App Catalog. In case you already have one, please skip this step.
  4. Tick Create a new app catalog site and press the OK button.
  5. 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:

  1. Navigate to the app catalog.
  2. Upload Piwik PRO app file.
  3. 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 PiwiPROModernIntegration

Register Piwik PRO app in your tenant

To register the Piwik PRO app in your tenant, please follow these steps:

  1. Go to http://"AnySharePointWebsite"/_layouts/15/AppRegNew.aspx where AnySharePointWebsite is the site collection where Piwik PRO will be installed or the root site collection.
  2. Fill the inputs with data shown below and click the Create button






  3. 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

  1. Go to Site Collection and check if Piwik PRO is enabled.
  2. 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

  1. Go to Site content of the site collection.
  2. Click Add an app or New > App (depending on the UI version).
  3. Find Piwik PRO and click it to install.
  4. You’ll see pop-up app permissions. Click Trust it to proceed with the installation.
  5. For version older than 1.0.0.2, you’ll see the view like in the picture below.
  6. For version newer than 1.0.0.3, you’ll see the view like in the picture below and you’ll need to approve the installation.
  7. To approve the installation, click Find out why and you will proceed to the following screen.
  8. Click Request approval and the request button in the pop-up window.
  9. Now App needs to be approved in App Catalog (described in Application installation in App Catalog).
  10. The app catalog will look like in the picture below.
  11. Click Piwik PRO. This will open the approval window.
  12. Click the Approve button.
  13. Navigate back to Site Collection where the app should be installed.
  14. Go to Site content of the site collection. Click Add an app or New > app (depending on the UI version).
  15. Find Piwik PRO and click it to install.
  16. You’ll see a pop-up app permissions. Click Trust it to proceed with the installation. The installation process will take about 1 minute.
  17. If everything went okay you will see Piwik PRO app installed in the site content of the site collection.

Configuring Piwik PRO

License

  1. 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.
  2. Fill the input with the key and click Save or click Request trial.
  3. 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.

Troubleshooting

In case you registered the app with incorrect URL you will see the information like in the picture below.

Please follow the instruction below:

  1. 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.
  2. Use PowerShell to invoke:
  3. 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.

  4. Go to https://YourSite/_layouts/15/appprincipals.aspx and make sure that there is no Piwik
    Pro there (if it does exist – please delete it)
  5. Go to https://YourSite/_layouts/15/appregnew.aspx and add an app again with above
    ClientId / ClientSecret /
    • The App Domain should be set to piwikpro.azurewebsites.net
    • The Redirect URI should be set to https://piwikpro.azurewebsites.net/
Was this article helpful?

Be the first to rate this article.

Technical Support

If you have any questions, drop us a line at support_SPC@piwik_SPC.pro.

We’re happy to help!