cancel
Showing results for 
Search instead for 
Did you mean: 
ThatAPIGuy

Deep Dive: Click-Through PowerApps Analytics

Introduction

This blog post will walk through a simple approach to create your own click-through analytics. Extend your reporting options to include statistics which will raise visibility into how your app consumers navigate your applications, enabling you to use data to validate assumptions on app usage and design.

 

I have attached the MSAPP files and the datasource sample(excel spreadsheet) so you can play around with the app to understand it better and then implement the same approach in your apps.

 

 

Workflow overview -

2018-04-18 08_05_21-Presentation1 - PowerPoint.png

 

To explore the app, follow these steps -

 

Step 1Install the app from the MSAPP file that I have attached below.

 

Step 2: Save the excel spreadsheet "AnalyticsDemo.xlsx" in your OneDrive and add it as a data source in the app using the OneDrive connector.

 

Step 3: After saving and publishing the app, open the app and click on some icons and navigate around the app. Check whether the data gets collected in the Excel Spreadsheet. (Note: Sometimes it may take a few seconds before the data gets updated so you might have to close and open the spreadsheet once)

 

Step 4: Use the OneDrive excel spreadsheet as a data source in a PowerBI report and create different graphs/statistics based on what you would like to measure. Below is an example to get you started -powerbi report.png

 

 

Capturing Interaction points-

 

The main functions that I have used to capture the user interaction are the Patch and Collect functions. 

 

To start with, you would probably like to collect some basic user information before you capture any further interaction points of that user. To do this, I used the below formula in the OnStart property of the app- 

 

Collect(AnalyticsDemo,{UserName:Office365Users.MyProfile().DisplayName,UserEmail:Office365Users.MyProfile().Mail,LoginDate:Today(),LoginTime:Text( Now(), "[$-en-US]hh:mm:ss" ),Latitude:Location.Latitude,Longitude:Location.Longitude})

This will create a new record in the Excel data source and because we are using the OnStart property, the basic user information will get collected only once, i.e., when the app is opened by the user. For capturing user details, I have used the Office365users connector.

 

For any further interaction points / clicks , I used the Patch function to update data in the record that was created above. Below is an example of the Patch function used in the OnVisible property of the Products screen -  

 

Patch(AnalyticsDemo,Last(AnalyticsDemo),{ProductScreen:"Y"})

where 

  • AnalyticsDemo is the excel data source
  • Last(AnalyticsDemo) is the last record created in the data source ( which will be the one that was created on the OnStart property)
  • ProductScreen: "Y" updates the ProductScreen column of the data source, which tells you that the Products screen was opened by the user.

This way you can capture any interaction point by using the Patch function as mentioned above in either the OnSelect property of different controls or OnVisible property of different screens and updating a column field in the data source accordingly.

 

Main takeways from implementing Custom Click-through Analytics

 

  • Track business/team goals and app usage
  • Identify potential app capabilities that need to be modified/upgraded
  • Generate reports to emphasize the impact of PowerApps (esp. for your organization's leadership)

 

For more details, have a look at this webinar where I and @Audrie-MSFT talk about it in detail -

 

 

Thanks for reading!

 

Vivek

 

 

 

Comments