- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-25-2017 08:03 PM
11-01-2017 08:03 AM
Hi @unima,
Firstly, it sounds to me like you are trying to implement the SDK with 2 different accounts (and/or profiles) side by side. Is that correct?
If so, it's important to understand the role of the instance name. The instance name you pass with your tracking call determines which account the call will be sent to. If you are using 2 different accounts/profiles side by side, you need to make sure they both have a unique instance name, and then specify that instance name in all tracking calls.
Here's some sample code:
NSString* uniqueInstanceKeyA = @"firstinstance";
NSString* uniqueInstanceKeyB = @"secondinstance";
NSString* firstAccount = @"tealium";
NSString* secondAccount = @"acmeinc";
NSString* firstProfile = @"ios-app";
NSString* secondProfile = @"wile-e-coyote";
TEALConfiguration * tealConfigA = [TEALConfiguration configurationWithAccount:firstAccount profile:firstProfile environment:@"dev"];
Tealium* instanceA = [Tealium newInstanceForKey:uniqueInstanceKeyA configuration:tealConfigA];TEALConfiguration * tealConfigA = [TEALConfiguration configurationWithAccount:secondAccount profile:secondProfile environment:@"dev"];
TEALConfiguration * tealConfigB = [TEALConfiguration configurationWithAccount:secondtAccount profile:secondProfile environment:@"dev"];
Tealium* instanceB = [Tealium newInstanceForKey:uniqueInstanceKeyB configuration:tealConfigB];
// send a tracking request to instance A:
[instanceA trackEventWithTitle: @"eventA" dataSources: @{@"somestring":@"somevalue"}];
// send a tracking request to instance B:
[instanceB trackEventWithTitle: @"eventB" dataSources: @{@"somestring":@"somevalue"}];
Does that make sense? If you need further information, please see the documentation here: https://community.tealiumiq.com/t5/Tealium-for-iOS/Adding-Tealium-to-Your-iOS-App/ta-p/16327#toc-hId...
Craig.
03-21-2018 11:49 PM
03-22-2018 01:46 AM
Copyright All Rights Reserved © 2008-2023