Why Web Analytics for Business Apps?
If you want to gather Usage data for your business apps, Web Analytics Software provides useful insights and answers to questions like
- How many Users are using the App?
- What is the Users Average Visit Duration?
- Where do User come from (geographically)?
- What End-Devices is your App used with?
- What actions were done by Users within your Apps?
- How can individual Event within the App be tracked?
- … and much more
To define performance and success metrics for your business apps gives you the opportunity to track, measure and report Key Performance Indicators (KPI) that fuel the Return on Investment of your App.
- Simplifier Server with a Business App that you want to get Usage Insights on
- Web Analytics Software e.g. Matomo, Google Analytics, SAP Web Analytics or similar
- In this example we will look at SAP Web Analytics, which is a Cloud Service offered by SAP Business Technology Platform that provides lots of Insights for Web / Mobile Application Usage.
Step 1 – Get the tracking Code
After successful setup of SAP Web Analytics and your Application you can acquire the JS Tracking Code. The Tracking code looks like this:
We will copy this code to the Clipboard and create a new Client-Side Business Object on a Simplifier Server. Let’s call it “SAP_WebAnalytics”. Now we create a new function within the Business Object called “initTracker”. We will need to Input Parameters named “pubToken” and “baseUrl” of type “String” that we will use within our function’s code:
Next up we will paste in the Tracking Code that we copied earlier without the script tags which will loke like this:
Now we will replace the attributes “pubToken” and “baseUrl” with our previously created input parameters. Input parameters of Client Side Business Objects can be accessed via “oPayload.nameofParameter” so in our case: oPayload.pubToken and oPayload.baseUrl
Also we will attach the swa variable from the Tracking Code to the window object.
We can now set the input parameters value to our pubToken and the baseUrl of SAP Web Analytics:
Now that we have initialized the Tracking Code, our application will be tracked on the SAP Web Analytics Dashboard