How to consume Web Analytics as a SAP BTP API Service


SAP Web Analytics is a Software-as-a-service (SaaS) on the Business Technology Platform(BTP). The application lets you collect, report, and analyse your website usage data that helps you to identify meaningful patterns from various digital channels. The application can offer insights on how well your websites perform in key channels. These insights can lead you to implement critical improvements that help you optimize web usage to measure organisational goals, drive strategy, and improve the overall user experience of your web applications.

Some the external applications want to consume the Web Analytics API’s for their integration reasons or for reporting purposes. These applications do not want to perform actions on  UI instead they want to call the exposed API’s.

Applications not part of webanalytics organization wants to access these api’s securely so how is this possible?. Web Analytics API’s are secured one and only authorized person can access the API’s.

Business Technology Platform provides a concept of broker which helps the applications by providing client id and certificate to access the webanalytics API’s in case of grant type client credentials or user token in case of user flow.

For the above reason Web Analytics exposed some of its API’s which can be consumed by application by creating an instance of Web Analytics API Service.

How to create an instance of Web Analytics API Service


Service Key Properties

Once the properties are fetched generate the JWT token using certurl,key,certificate and client id.

Use the JWT Token generated and pass it to header with “Authorization” Bearer and JWT Token value and call exposed SWA API’s.

All the exposed API’s are available here


After going through this blog you will be able to use the Web Analytics Exposed API’s using Web Analytics API service instance for the application integration scenario.