Windows App using Adobe Analytics tracking
All of the examples provided here are using C#
You can find the official documentation here
All up to date Adobe Analytics mobile SDKs can be found here
You need to create an app in Adobe Mobile Services : https://mobilemarketing.adobe.com/ . This will allow you to download the latest mobile SDKs 4.x and the correct config file
You need to replace the ADBMobileConfig.json by the one downloaded from Adobe Mobile services:
- Right-click you your project and select Add > Existing Item.
- Browse to ADBMobileConfig.json and click Add.
Once you replace the config file by the one download from Adobe Mobile services, make sure to do the following:
0.Right-click ADBMobileConfig.json in your solution and select Properties. 0.Change Build Action to Content.
Follow the steps provided in this documentation
You need to change the debugger type to Native only or Mixed
For each project the following code was added to use Adobe analytics tracking in the file App.xaml.cs
using ADBMobile;
public App()
{
this.InitializeComponent();
this.Resuming += this.OnResuming;
this.Suspending += this.OnSuspending;
}
public App()
{
this.InitializeComponent();
this.Resuming += this.OnResuming;
this.Suspending += this.OnSuspending;
}
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Debug.WriteLine("In OnLaunched");
/*Adobe Analytics code start*/
ADBMobile.Config.SetDebugLogging(true);
//Start the lifecycle tracking
ADBMobile.Config.CollectLifecycleData();
//Send a normal pageView (State)
ADBMobile.Analytics.TrackState("Test Adobe mobile windows app desktop", null);
/*Adobe Analytics code end*/
[...]
private void OnSuspending(object sender, SuspendingEventArgs e)
{
Debug.WriteLine("In OnSuspending");
/*Adobe Analytics code start*/
ADBMobile.Config.PauseCollectingLifecycleData();
/*Adobe Analytics code end*/
[...]
private void OnResuming(object sender, object e)
{
Debug.WriteLine("In OnResuming");
/*Adobe Analytics code start*/
ADBMobile.Config.CollectLifecycleData();
ADBMobile.Analytics.TrackState("Test Adobe mobile windows app desktop", null);
/*Adobe Analytics code end*/
}