How-to's with sample code for iOS
Instrument form completion in your application
If you use OverStat in an Activity or Fragment, you must implement logFormCompletion
to generate reports based on user activity within a form.
Note:
This step is completely manual and will not be automated because of the different architectures that an application can have, it is difficult to instrument. The form page can also have additional custom validation that would indicate if completion was correct or not.
When a form is complete and ready to submit, it looks as follows.
RLMRealm *realm = [RLMRealm defaultRealm];
[realm transactionWithBlock:^{
[realm addObject:order];
[AppManager sharedInstance].anonymousCartItems = [NSMutableArray array];
[[NSNotificationCenter defaultCenter] postNotificationName:@"CartItemUpdated"
object:self];
[self showConfirmationDialog];
[[TLFCustomEvent sharedInstance] logFormCompletion:YES withValidData:YES];
}];
Implement Apple Advertising ID in your application
Acoustic Tealeaf can capture Apple identifier for advertisers (IDFA) data using the Acoustic Tealeaf AdvertisingId
property. The IDFA is a unique, user-resettable ID for advertising. The IDFA gives users better controls and provides developers with a standard system to continue to monetize their apps. The IDFA also gives users the ability to reset their identifier or opt out of personalized ads within an application.
Add the advertisingId
property to the mobileEnvironment
section of your application and define the value for the advertisingId
. Here is an example:
{
"clientEnvironment": {
"mobileEnvironment": {
"android": {
"keyboardType": 2,
"brand": "generic",
"fingerPrint": "generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys"
},
"totalMemory": 63422464,
"totalStorage": 12288,
"orientationType": "PORTRAIT",
"appVersion": "1.0.5",
"manufacturer": "unknown",
"deviceId": "11111111111111111111111111111111",
"advertisingId": "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY",
"locale": "English (United States)",
"deviceModel": "sdk",
"language": "English"
},
"width": 0,
"height": 0,
"osVersion": "2.2"
}
}
If the end user has chosen to opt-out of ads, advertisingId
returns the following value:
"advertisingId": "N/A"
.
Updated 2 months ago