User profiling for Windows apps
You can add multiple users for the analytics data but all the data will be mapped to a single primary user (by default).
You can change the primary user at runtime.
You need to change the primary user before you remove the current primary user. If no primary user found, data will be mapped to anonymous.
Add the user using the below function.
For UWP apps
Copied
For WinUI apps
Copied
- Show the user consent popup using the below code. You can decide to show the consent popup only once for all users, or once for each user.
For UWP apps
Copied
For WinUI apps
Copied
- Remove a user, using the below code.
For UWP apps
Copied
For WinUI apps
Copied
- To check for a primary user, use the below code.
For UWP apps
Copied
For WinUI apps
Copied
- To change the primary user, use the below code.
For UWP apps
Copied
For WinUI apps
Copied
Customize the consent pop-up
Consent pop-up can be customized based on your requirements. To customize the consent pop-up, you can apply certain style elements to the same.
For UWP apps
Copied
For WinUI apps
Copied
Similarly, crash consent pop-up can be customized too.
Copied
Add privacy settings
You can use Apptics' settings to monitor three parameters, i.e., In-app usage stats, Crash reporting, and Enabling user id.
The mentioned parameters can be managed in two ways.
- Through the SET & GET method.
- Through the Settings control that will manage all the values.
SET and GET method
- To track the in-app usage, call the below method and set the value to True. If the value is set to False, in-app usage won't be tracked.
SET the value
Copied
GET the value
Copied
- To report a crash, call the below method and set the value to True. If the value is set to False, the crashes won't be reported.
SET the value
Copied
GET the value
Copied
- To enable the user id, call the below method and set the value to True. If the value is set to False, the user id won't be enabled.
- If the user id is enabled, it will be included in the Crash reports. If not, then the crashes will be reported anonymously.
SET the value
Copied
GET the value
Copied
You can also use your own custom pop-up and use the Apptics SDK.
- Call the below SDK functions to present the custom pop-up.
Settings control
Follow the below steps to manage and monitor the three parameters, i.e., in-app usage, crash reporting, and enabling user id.
- Include the namespace xmlns:apptics="using:AppticsAnalytics.Settings" in the XAML page.
- Include the code to plug-in the settings control into your application.
Copied