- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi Community Members,
I am facing an issue where tealium utag.js call not firing on iOS app. We already have an iOS app implementation through tealium and now we wanted to onboard a new implementation for iOS again and for this we are using the same tealium profile because the nav/screen somehow same on both app. Also to reduce our effort we have plan to use the same tealium profile to send data in adobe analytics. the only change we made to ditinguish the different app environment is changing the appID value and Tealium newInstanceForKey, but weare not able to get utag call for the newly implementation.
Below are the tealium code for both the app but not sure where i making a mistake. Cn someone please help?
Older Code ( Which is working perfectly fine on old app)
// For 1BLK app configuration NSString *env = @""; #if DEBUG env = @"dev"; #else env = @"prod"; #endif TEALConfiguration *tealConfig = [TEALConfiguration configurationWithAccount:@"blackrock" profile:@"app-oneblk" environment:env datasource:@""]; // Initialize with a unique key for this instance [Tealium newInstanceForKey:@"OneBLK" configuration:tealConfig]; //For screen tracking - (void)logScreen:(NSString *)screenName { Tealium *tealium = [Tealium instanceForKey:@"OneBLK"]; NSDictionary *optionalData = @{@"appSection":[self sanitizeString:screenName], @"userId":[self encryptLoggedInUser], @"loginStatus":@"signedin", @"environment" :[self envForAnalytics], @"appLocalTime" : [NSString stringWithFormat:@"%@",[NSDate date]], //device Local time @"appID" : @"OneBLK" // OneBLK }; [tealium trackViewWithTitle:[self sanitizeString:screenName] dataSources:optionalData]; } // For event tracking - (void)logEventWithCategory:(NSString *)category action:(NSString *)action label:(NSString *)label value:(NSNumber *)value { NSString *linkName = [NSString stringWithFormat:@"%@:%@",[self sanitizeString:category],[self sanitizeString:action]]; Tealium *tealium = [Tealium instanceForKey:@"OneBLK"]; NSDictionary *optionalData = @{@"appSection":[self sanitizeString:category], @"userId":[self encryptLoggedInUser], @"loginStatus":@"signedin", @"environment" :[self envForAnalytics], @"appLocalTime" : [NSString stringWithFormat:@"%@",[NSDate date]], //device Local time @"appID" : @"OneBLK", // OneBLK @"linkName" : linkName, @"searchTerm" :[self searchTerm:action] }; [tealium trackEventWithTitle:[self sanitizeString:action] dataSources: optionalData]; }
New App Code woth Appid and Tealium new instanceforkey changes:
NSString *env = @""; #if DEBUG env = @"dev"; #else env = @"prod"; #endif TEALConfiguration *tealConfig = [TEALConfiguration configurationWithAccount:@"blackrock" profile:@"app-oneblk" environment:env datasource:@""]; // Initialize with a unique key for this instance [Tealium newInstanceForKey:@"SOTM" configuration:tealConfig]; For screen tracking - (void)logScreen:(NSString *)screenName { Tealium *tealium = [Tealium instanceForKey:@"SOTM"]; NSDictionary *optionalData = @{@"appSection":[self sanitizeString:screenName], @"userId":[self encryptLoggedInUser], @"loginStatus":@"signedin", @"environment" :[self envForAnalytics], @"appLocalTime" : [NSString stringWithFormat:@"%@",[NSDate date]], //device Local time @"appID" : @"SOTM" // SOTM }; [tealium trackViewWithTitle:[self sanitizeString:screenName] dataSources:optionalData]; } // For event tracking - (void)logEventWithCategory:(NSString *)category action:(NSString *)action label:(NSString *)label value:(NSNumber *)value { NSString *linkName = [NSString stringWithFormat:@"%@:%@",[self sanitizeString:category],[self sanitizeString:action]]; Tealium *tealium = [Tealium instanceForKey:@"SOTM"]; NSDictionary *optionalData = @{@"appSection":[self sanitizeString:category], @"userId":[self encryptLoggedInUser], @"loginStatus":@"signedin", @"environment" :[self envForAnalytics], @"appLocalTime" : [NSString stringWithFormat:@"%@",[NSDate date]], //device Local time @"appID" : @"SOTM", // SOTM @"linkName" : linkName, @"searchTerm" :[self searchTerm:action] }; [tealium trackEventWithTitle:[self sanitizeString:action] dataSources: optionalData];
Let me know if need additional help.
Thanks,
Nandan
09-11-2019 09:01 AM - edited 09-11-2019 09:02 AM
Hi @Nandan,
is this still a issue that you are waiting to get answer on?. i can try assisting here.
Code details shown in your post looks great to me per the Tealium instructions.
Here are few check point recommendations:
1) We would like to check, if you have followed the steps to install the tealium framework on to the new app xcode project? Refer to the "Install" section on the following link
https://docs.tealium.com/platforms/ios/install/
2) is there any specific errors on the app logs related to tealium?
More than happy to assist further. Just let me know.
Thanks & Regards
Abraham
Copyright All Rights Reserved © 2008-2023