Page History
Table of Contents |
---|
Once you have installed the Gamify add-in for SharePoint from the Microsoft Office Store, you will then be redirected to a configuration screen.
Gamify App for SharePoint
The configuration contains a few simple steps that walk you through setting up Gamify.
...
The Gamify ribbon is only available on sites once the tracking code is deployed for them in the "Add the Gamify Tracking Code to your Sites" step.
- Click Connect.
Note: A global administrator account is required in order to consent to the permissions required to read items from all site collections and read users' full profiles. - Click Accept to approve the required permissions.
Note: An App will be created in your Azure Active Directory. It may take up to 24 hours for changes to take effect. - With this section expanded, you should see all of your available SharePoint Online site collections.
Gamify Configuration Screen: Step 1 - Select all the sites you would like to integrate with.
- You can also search for site collections by typing in their name in the search bar.
- Select the button next to each site you would like to integrate with.
- Click Save to confirm your selection.
...
Anchor | ||||
---|---|---|---|---|
|
In order to divide all users into groups that will compete with each other based on their organizational information (department, office, etc.), select which user profile attribute you would like to group users by.
This information will be taken from SharePoint user profiles. If you have created custom profile properties you can also use them.
Gamify Configuration Screen: Step 2
Anchor | ||||
---|---|---|---|---|
|
This step allows you to add the JavaScript tracking code to each of your sites.
Select one of the following options to add the tracking code to specific sites or deploy it on all selected site collections and their subsites automatically.
Install the tracking code automatically using a SharePoint App
(recommended)Select this option to add the tracking code to all selected sites (in "Choose Sites to Integrate with" step) automatically using a SharePoint App.
Note: This is the recommended Use this method for installing the tracking code on all selected site collections, including automatically enabling it for newly created subsites under the selected site collections.
Create a SharePoint App
- Login to SharePoint with the Global Administrator account.
- Navigate to
https://<Admin Center>/_layouts/15/
AppRegNew.aspx
(e.g. https://company-admin.sharepoint.com/_layouts/15/AppRegNew.aspx). - Create a 'full-trust' app with the following details:
- Client ID and Secret - click Generate to automatically create a client ID and secret and copy these values.
- Title - CardioLog Analytics Tracking Deployment
- App Domain - localhost
- Redirect URI - https://localhost
- Navigate to
https://<Admin Center>/_layouts/15/
AppInv.aspx
(e.g. https://company-admin.sharepoint.com/_layouts/15/AppInv.aspx). Paste the client ID into the App Id field. Click Lookup. The existing values for Title, App Domain and Redirect URL should appear.
Enter the following XML into the App's Permission Request XML field to specify required permissions. Then click Create.
<AppPermissionRequests AllowAppOnlyPolicy=
"true"
>
</AppPermissionRequests>
You will be prompted to approve permissions for the app. Click Trust It.
Once the App is created, return to the Gamify configuration screen and enter the details of the Client ID and Client Secret in the "Add the Gamify Tracking Code to your Sites" step.
Select Automatically track all subsites including newly created ones in order to automatically enable tracking for newly created subsites under the selected site collections (in "Choose Sites to Integrate with" step).
- Select Notify me when client secret expires or is not working in order to receive an email alert to the specified email address. Follow these steps in order to renew the SharePoint App client secret if needed.
- Click Save.
- Click Install Tracking to install the tracking code on all selected site collections and their subsites.
Note: This step may take a while to complete, depending on the amount of selected sites. Follow the installation progress on the screen. - Click View installation report to view a detailed report of the installation progress. Click the top left down arrow icon to export the report to CSV.
Anchor | ||||
---|---|---|---|---|
|
Execute the following PowerShell commands with the SharePoint Online Global Administrator account.
Edit the "Client ID" and use the Client ID value from the Gamify configuration screen in "Add the Gamify Tracking Code to your Sites" step.
Connect-MsolService
$clientId =
"Client ID"
$keys = Get-MsolServicePrincipalCredential -AppPrincipalId $clientId -ReturnKeyValues
false
$keys
Remove-MsolServicePrincipalCredential -KeyIds $keys.KeyId -AppPrincipalId $clientId
In the same PowerShell window, execute the following PowerShell commands in order to generate a new client secret.
$bytes = New-Object Byte[]
32
$rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()
$rand.GetBytes($bytes)
$rand.Dispose()
$newClientSecret = [System.Convert]::ToBase64String($bytes)
$dtStart = [System.DateTime]::Now
$dtEnd = $dtStart.AddYears(
1
)
New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Sign -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Verify -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Password -Usage Verify -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
$newClientSecret
Copy the new client secret value and update it in the Gamify configuration screen in the "Add the Gamify Tracking Code to your Sites" step and click Save.
Install the tracking code automatically using a PowerShell script
Select this option to add the tracking code to all selected site collections (in "Choose Sites to Integrate with" step) automatically using a PowerShell script.
Note: It is required to execute the PowerShell script every time you create new sites under the selected site collections in order to enable tracking for them.
- Click CardioLog Analytics Tracking Deployment package to download the deployment package from the "Add the Gamify Tracking Code to your Sites" step in the Configuration page.
The package includes a PowerShell script that deploys the tracking agent wsp solution, modern sites integration app and the Java Script tracking code on all selected site collections. - Right click the downloaded package zip file, select Properties > General and click on "Unblock" before unzipping it.
- Execute the Run_Script.ps1 script in Windows PowerShell (do not use Windows PowerShell ISE version). Make sure to close all browser windows on your machine before executing the script.
Note: You must have the MS Online module installed and the credentials of the SharePoint Online global administrator.
Install the tracking code manually
Select this option to add the tracking code to specific sites manually.
- Click CardioLog Analytics Tracking solution to download the deployment package from the "Add the Gamify Tracking Code to your Sites" step in the Configuration page.
- Right click the downloaded package zip file, select Properties > General and click on "Unblock" before unzipping it.
- Temporarily allow custom scripts during the installation in order to add the JavaScript tracking code and Tracking Agent application (sppkg for modern sites, wsp solution for classic sites) to your app catalog and all of the site collections you wish to monitor.
Execute the following commands in the SharePoint Online Management Shell (edit your SharePoint admin center and site collection URLs).Connect to SharePoint Online Admin Center with the SharePoint Online Global Administrator account:
Connect-SPOService -Url https:
//company-admin.sharepoint.com
Get the current value of the Custom Scripts setting DenyAddAndCustomizePages for each site collection you wish to monitor and for your App Catalog:
Get-SPOsite https:
//company.sharepoint.com | Select DenyAddAndCustomizePages
If the current value of DenyAddAndCustomizePages is Enabled, set it to Disabled:
Set-SPOsite https:
//company.sharepoint.com -DenyAddAndCustomizePages 0
- Disconnect from SharePoint Online:
Disconnect-SPOService
- Browse to your SharePoint Online site collection Solution Gallery. The gallery should be found at the following address (replace the site collection root URL https://company.sharepoint.com/sites/site with yours): https://company.sharepoint.com/sites/site/_catalogs/solutions/forms/allitems.aspx
- From your Solution Gallery, click Upload Solution > Choose File. Then select the CAI.wsp solution file which can be found in the deployment package and click Activate.
- If you are presented with a request for access, make sure you have temporarily allowed custom scripts for your site collection and app catalog.
Once the solution is installed, return to the Gamify configuration screen and click Copy script to copy the JavaScript tracking code.
Browse to CardioLog Analytics Integration solution configuration page. The page should be found at the following address (replace the site collection root URL https://company.sharepoint.com/sites/site with yours): https://company.sharepoint.com/sites/site/CardioLogAnalytics/Configuration.2.0.8.0.aspx
Paste the tracking code copied from the "Add the Gamify Tracking Code to your Sites" step and click OK.
In order to track SharePoint Online modern sites and pages, install the Tracking Agent App:
Click CardioLog Analytics Tracking Agent App for modern sites to download the Tracking Agent App.
Upload the CardioLogTrackingAgentAddin.sppkg app to the SharePoint Admin apps > App Catalog > Apps for SharePoint > New.
Click Deploy (do NOT select "Make this Solution available to all sites in the organization")
Add the App to your site collection and to all of its subsites under Site Contents > New App
Click on Apps from your organization and click CardioLog Tracking Agent (it will be installed automatically)
After the installation is complete, revert the changes performed in step 3 (if any) and disable custom scripts.
Connect-SPOService -Url https:
//company-admin.sharepoint.com
Set-SPOsite https:
//company.sharepoint.com -DenyAddAndCustomizePages 1
Disconnect-SPOService
Inject the tracking code to all site pages yourself
Select this option to inject the tracking code manually to your site pages.
- Click Copy script to copy the JavaScript tracking code to the clipboard.
- Paste the tracking code into the <head> section of each site page you would like to track.
Anchor | ||||
---|---|---|---|---|
|
In order to access the Gamify Admin Dashboard, select the users you would like to grant the admin role to.
- Connect with an account that is a global administrator in your Office 365 tenant. This account will be used in order to approve the required permissions for the Gamify Azure AD App to manage user roles in Azure AD.
Gamify Configuration Screen: Step 4 - Click Accept to approve the required permissions.
- In order to grant the admin role to a user, enter the user principal name (UPN) and click Save.
Gamify Configuration Screen: Step 4
Step 5: Game Settings
In this step, you can set up the game settings, including scheduling game rounds and calculating scores. You can assign points for various user activities like viewing content, creating content, and liking content. Points can be awarded to different personas—Explorer, Engager, and Contributor—based on their usage patterns. Additionally, content owners can earn points when users interact with their content by liking or commenting on it, through "Derived" events. The users' scores are determined by their overall activity within SharePoint.
User Personas
Explorer - Mainly consumes content. For example, views content and performs searches.
Engager - Mainly interacts with content. For example, likes content, rates content and follows content.
Contributor - Mainly contributes content. For example, writes posts and comments, uploads documents, etc.
Please note that after the initial setup, there will be a "gathering period" during which the system will collect data about your users. This data will be used to group and profile users based on their usage habits and assign them to personas. By default, the gathering period is set to 30 days (configurable). The first game round can be scheduled immediately after this period.
- When there is no active game round, configure a new game round in the Next Round Settings.
- Set the Start Date and End Date for the game.
- Click on Add event to include the user activities for which you'd like to allocate points. For example viewing content, creating content, liking content etc. You can allocate different points to particular actions within each persona, enabling diverse weightings tailored to the user's profile and typical usage patterns.
- Click Save.
Gamify Configuration Screen: Step 5 - During an ongoing game round, you'll find its settings displayed under Current Round Settings. For upcoming rounds, you can adjust the settings under Next Round Settings.
Gamify Configuration Screen: Step 5