Adobe Launch does not send track to Analytics

Avatar

Avatar

zihaof25182964

Avatar

zihaof25182964

zihaof25182964

01-04-2019

Hi Adobe,

Environment:

iOS: 10

ACP: 2.0

Recently I am working on integrating Adobe Launch with my application, and I am facing the following issue:

My application is built under ReactNative, so it's using Objective-C for initialization code.

In AppDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation

                                                      moduleName:@""

                                               initialProperties:nil

                                                   launchOptions:launchOptions];

  rootView.backgroundColor = [UIColor blackColor];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

  UIViewController *rootViewController = [UIViewController new];

  rootViewController.view = rootView;

  self.window.rootViewController = rootViewController;

  [self.window makeKeyAndVisible];

 

  //============= Aodbe launch initilization code =============

  [ACPCore setLogLevel:ACPMobileLogLevelVerbose];

  [ACPCore configureWithAppId:@""];

 

  [ACPAnalytics registerExtension];

  [ACPUserProfile registerExtension];

  [ACPIdentity registerExtension];

  [ACPLifecycle registerExtension];

  [ACPSignal registerExtension];

 

  [ACPCore start:^{

    [ACPCore lifecycleStart:nil];

  }];

  //===========================================================

  return YES;

}

I created a swift file to wrap ACPCore functions so that I could call in React Native using javascript, I could verify that those calls went into swift and they've been executed. From the console log, I could see the following:

2019-04-01 09:30:17.313534-0400 Sandbox[1010:329848] [AMSDK DEBUG <Core>]: Registered Configuration module

2019-04-01 09:30:17.315373-0400 Sandbox[1010:329954] [AMSDK DEBUG <com.adobe.module.lifecycle>]: virtual void AdobeMarketingMobile::Lifecycle::OnRegistered()

2019-04-01 09:30:17.322523-0400 Sandbox[1010:329953] [AMSDK ERROR <SystemInfoService>]: Failed to get valid c++ locale string from iOS Platform. Returning the default locale

2019-04-01 09:30:17.322911-0400 Sandbox[1010:329952] [AMSDK DEBUG <DatabaseService>]: <ADBMobileIdentity.sqlite> opened successfully

2019-04-01 09:30:17.325134-0400 Sandbox[1010:329952] [AMSDK DEBUG <com.adobe.module.identity>]: Privacy opted-in: Attempting to send Identity queued hits from database

2019-04-01 09:30:17.330107-0400 Sandbox[1010:329954] [AMSDK DEBUG <DatabaseService>]: <ADBMobileSignals.sqlite> opened successfully

2019-04-01 09:30:17.332887-0400 Sandbox[1010:329951] [AMSDK DEBUG <EventHub(AMSEventHub)>]: Processing Event #0 - { class: "Event", name: "EventHub", source: "com.adobe.eventSource.booted", type: "com.adobe.eventType.hub", pair_id: "", response_pair_id: "4", event_number: 0, timestamp: "1554125417332 ms", data: [], super: { class: "Object", this: 10753941472, typeid: "N20AdobeMarketingMobile5EventE" }}

2019-04-01 09:30:17.333032-0400 Sandbox[1010:329951] [AMSDK DEBUG <EventHub(AMSEventHub)>]: Event #0 (com.adobe.eventType.hub) resulted in 0 consequence events.  Time in rules was 0 milliseconds.

2019-04-01 09:30:17.333261-0400 Sandbox[1010:329955] [AMSDK DEBUG <com.adobe.module.configuration>]: Shared state is created for event number 0 with PENDING

2019-04-01 09:30:17.335493-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: Processing boot configuration event

2019-04-01 09:30:17.335621-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: Loading overridden configuration from persistence -

2019-04-01 09:30:17.335806-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: AppID loaded from persistence - MyLaunchID

2019-04-01 09:30:17.335856-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: Valid AppID is retrieved from persistence - MyLaunchID

2019-04-01 09:30:17.336872-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: Cached configuration loaded.

{"global.privacy":"optedin","analytics.launchHitDelay":0,"analytics.backdatePreviousSessionInfo":true,"analytics.offlineEnabled":true,"__dev__analytics.rsids":"myapp","build.environment":"dev","__ui__.mobileServiceApp":"My App(myappdev)","rules.url":"https://assets.adobedtm.com/myLaunchId.zip","experienceCloud.org":"myCloudId@AdobeOrg","lifecycle.sessionTimeout":300,"mobile.acquisitionAppId":"id","analytics.server":"my.server.com","mobile.acquisitionTimeout":0,"analytics.rsids":"myrsid","__ui__.manualMode":false,"mobile.messagesUrl":"https://assets.adobedtm.com/RandomID/scripts/staelite-id.json","analytics.batchLimit":0,"property.id":"myPropertyId","global.ssl":true,"analytics.aamForwardingEnabled":false,"experienceCloud.server":"dpm.demdex.net"}

It looks fine at this point, after this I noticed:

2019-04-01 09:30:17.372166-0400 Sandbox[1010:329964] [AMSDK DEBUG <com.adobe.module.identity>]: Config not available at the time to process identity event.

2019-04-01 09:30:17.372256-0400 Sandbox[1010:329962] [AMSDK DEBUG <com.adobe.module.analytics>]: Couldn't retrieve shared state for com.adobe.module.configuration, it was pending

2019-04-01 09:30:17.380102-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: Loading overridden configuration from persistence -

2019-04-01 09:30:17.382009-0400 Sandbox[1010:329961] [AMSDK DEBUG <com.adobe.module.configuration>]: Shared state is updated for event number 0 with data

[ [ "analytics.aamForwardingEnabled", false ], [ "analytics.backdatePreviousSessionInfo", true ], [ "analytics.batchLimit", 0.000000 ], [ "analytics.launchHitDelay", 0.000000 ], [ "analytics.offlineEnabled", true ], [ "analytics.rsids", "myrsid" ], [ "analytics.server", "server

However it's still sending something to analytics server when I try to call TrackState(...):

2019-04-01 10:34:37.650428-0400 Sandbox[1060:341517] [AMSDK DEBUG <AnalyticsHitDatabase>]: Analytics request was sent with body (ndh=nalytics request was sent with body (ndh=1&c.&a.&AppID=myapp%201%20%281.0%29&CarrierName=mycarrier&DeviceName=iPhone8%2C1&OSVersion=iOS%2012.1.2&Resolution=750x1334&RunMode=Application&TimeSinceLaunch=66&.a&.c&aamb=...2019-04-01 10:34:51.815732-0400 Sandbox[1060:341437] [AMSDK DEBUG <com.adobe.module.analytics>]: Kick all hits event was sent

And it also triggers 1 consequence event, which is the processing rule being triggered:

2019-04-01 10:34:51.816273-0400 Sandbox[1060:341451] [AMSDK DEBUG <EventHub(AMSEventHub)>]: Event #32 (com.adobe.eventType.generic.track) resulted in 1 consequence events.  Time in rules was 0 milliseconds.

So it looks right here,I also had Charles on and I could see 200[ok] for all track calls to analytics, however none of those hits actually get into Adobe Analytics.

I've tried everything I could however I still can't figure out what happened.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

CaliseCheung

Employee

Avatar

CaliseCheung

Employee

CaliseCheung
Employee

01-04-2019

Hi Zihao,

     When offlineEnabled is set to true, we need to have timestamp enabled in the report suite. 
     Check Analytics Report Suite Manager > youReportSuite > Edit Settings > General > TimeStamp Configuration
     Check if it is enabled.
     Also verify you have the correct Report Suite ID in Launch setting.

    Let me know if you want to send us your company/org and RSID info, we can check them for you.

Best regards,

Calise Cheung

Adobe Experience Cloud

Answers (9)

Answers (9)

Avatar

Avatar

Ivan_Mironchuk

Employee

Avatar

Ivan_Mironchuk

Employee

Ivan_Mironchuk
Employee

16-10-2020

Hi @zihaof25182964 

 

Did you try the Analytics example with React Native? That might help resolve your issues. 

 

We are actually in the process of releasing a new Swift-based Core, and an updated React Native wrapper to follow. These should be available in Q12021 

Avatar

Avatar

christiank34241

Avatar

christiank34241

christiank34241

16-10-2020

Hi guys, run into the same problem. How does you solve this issue? Thanks, Chris

Avatar

Avatar

CaliseCheung

Employee

Avatar

CaliseCheung

Employee

CaliseCheung
Employee

02-04-2019

Hi Zihao,

     Good to know the issue is resolved.

Best regards,
Calise Cheung
Adobe Experience Cloud

Avatar

Avatar

zihaof25182964

Avatar

zihaof25182964

zihaof25182964

02-04-2019

Hi Calise,

We turned off the 'offlineEnabled' and we can see hits in analytics!

Thank you so much for your patience and replies!

Best Regards,

Zihao

Avatar

Avatar

CaliseCheung

Employee

Avatar

CaliseCheung

Employee

CaliseCheung
Employee

01-04-2019

Hi Zihao,

    In the log you provided, we saw the "analytics.server": is "my.server.com", and "analytics.rsids" is "myrsid".  Just want to confirm you do have a valid server and rsid set when run the real test, right?

Best regards,

Calise Cheung
Adobe Experience Cloud

Avatar

Avatar

zihaof25182964

Avatar

zihaof25182964

zihaof25182964

01-04-2019

Hi Calise,

  I had

{

global.privacy: optedin,

analytics.launchHitDelay: 0,

analytics.offlineEnabled: true

..

}

with some other id settings

Regards,

Zihao

Avatar

Avatar

CaliseCheung

Employee

Avatar

CaliseCheung

Employee

CaliseCheung
Employee

01-04-2019

Hi Zihao,

    What's your settings in Launch for Analytics extension? Do you have offline enabled, setting batch limit, etc?

Best regards,

Calise Cheung

Adobe Experience Cloud

Avatar

Avatar

zihaof25182964

Avatar

zihaof25182964

zihaof25182964

01-04-2019

Hi Calise,

Yes I've waited, actually I've been struggling with this issue for a week, and I could confirm I've gave Analytics enough time to respond.

Regards,

Zihao

Avatar

Avatar

CaliseCheung

Employee

Avatar

CaliseCheung

Employee

CaliseCheung
Employee

01-04-2019

Hi Zihao,

    It takes some time for data to show on Analytics, typically 30 - 60 mins.  Have you waited for some time and checked?

Best regards,

Calise Cheung

Adobe Experience Cloud