Data Insertion API and Mobile Lifecyle Metrics

KennyT-ATL

14-01-2019

Hello All,

I am seeking a best practice for implementing the lifecycle metrics using the API insertion route for apps.

Is there a document or example code that someone could share regarding the setup?

I know with the SDKs you basically just set the below for Install/Launch

{

"lifecyclecontextdata": {

"installdate": "22/05/2014",

"hourofday": 6,

"dayofweek": 2,

"osversion": "iOS 12.3",

"appID": "contextDataValue",

"resolution": "600x1345",

"devicename": "iPhoneX",

"launchevent": "LaunchEvent",

"prevsessionlength": 345,

"locale": "en-US",

"runmode": "Application",

"launches": 42

},

"starttimestampmillis": 44,

"maxsessionlength": 22,

{

"lifecyclecontextdata": {

"installevent": "InstallEvent",

"dailyenguserevent": "DailyEngUserEvent",

"monthlyenguserevent": "MonthlyEngUserEvent",

"installdate": "22/05/2014"...

},

}

{

"lifecyclecontextdata": {

"launchevent": "LaunchEvent",

"dailyenguserevent": "DailyEngUserEvent",

"monthlyenguserevent": "MonthlyEngUserEvent",

"installdate": "22/05/2014",

"launches": 42,

"dayssincelastuse": 4,

"dayssincefirstuse": 28...

},

}

Is there something equivalent that I can use for the API route?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

KennyT-ATL

14-01-2019

Side note, I was given this response previously,

If..."You want to use code to manually increase the Launches metric (and I think that's what you mean). then you'll want to set this context data variable:

s.contextData['a.LaunchEvent'] = '1';

(that's using JavaScript, obviously)"

I am looking for the equivalent for the API equivalent