Reply
Highlighted
Visitor
Posts: 1
Registered: ‎10-24-2017

Can not send data to both accounts at the same time? in iOS sdk

I used the tealium SDK in iOS code to send both instances of the event for the corresponding account,

But the event will be included in the two accounts, and can not be clearly sent to the specified account!!!

How can i solve it?

Reply
0 Kudos
Tealium Employee
Posts: 421
Registered: ‎09-01-2015

Re: Can not send data to both accounts at the same time? in iOS sdk

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.

Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Occasional Visitor
Posts: 1
Registered: ‎10-27-2017

Re: Can not send data to both accounts at the same time? in iOS sdk

Hi,

I use a different account and different InstanceForKey,   But the data will still be confusing

Reply
0 Kudos
Tealium Employee
Posts: 421
Registered: ‎09-01-2015

Re: Can not send data to both accounts at the same time? in iOS sdk

Hi @Loser1

Are you saying that you're using a different account and setting up a new instance of Tealium (as per my code example above), but the same data is being sent to both accounts? This should not be the case; as long as you have setup completely separate instances using different instance keys, there is total separation of the 2 instances and they should never receive each other's data. Are you able to share any code snippets with us? If not, I would recommend contacting support on support@tealium.com.

Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Reply
0 Kudos