An alternative approach for sending interaction data from native mobile apps to Sitecore

An approach to use the Sitecore Universal tracker for sending interaction data from native mobile apps to Sitecore, described in the previous blog post,  might not be feasible in some cases, for example, when the versions of Sitecore does not support it. In this case, another approach can be taken by using xConnect together with an intermediary application (a trusted client) between a mobile application and xConnect. The intermediary will receive data from mobile apps and submit it to xConnect.

Why is an intermediary application needed instead of sending requests to xConnect directly from mobile apps?

xConnect can receive data only from trusted clients with the correct client certificates. A client application must provide a valid certificate thumbprint. As a result, it is not practical to write data directly to xConnect Collection service from a mobile app installed on a mobile phone.

You can find information on how the intermediary application can send requests for creating, reading, updating and searching contacts and interactions  in the documentation. It is not necessary to have a Sitecore context for this.

SitecoreTrackingForMobilexConnect

Figure 1. How interaction data from the native mobile apps ends up shown in the  Sitecore Marketing and Analytics Tools by using a trusted intermediary application to communicate to xConnect.

Comparison of the two approaches for sending interaction data from native mobile apps to Sitecore:

  • Using the Sitecore Universal Tracker – this is a preferred approach as it does not require creating your own trusted intermediary application that receives interaction data from mobile apps and submits it to xConnect.
  • Using xConnect together with a trusted  intermediary application can be an option when the Sitecore version does not support the Universal Tracker, though it will require extra time to create the intermediary and a mechanism to handle it.

 

SitecoreTrackingForMobileUT

Figure 2. How interaction data from the native mobile apps ends up shown in the  Sitecore Marketing and Analytics Tools by using the Sitecore Universal Tracker.

Related posts:

  1. Approaches for writing interaction data from native mobile apps to Sitecore with examples for Android (Kotlin)
  2. Enabling contact-related personalization when retrieving Sitecore content for native mobile apps

Useful links:

  1. Sitecore documentation for how to instantiate client in a non-Sitecore context
  2. Sitecore documentation for xConnect Client API

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s