Skip to content

Commit fe7e1fa

Browse files
committed
Correctly send int value
1 parent d2370c3 commit fe7e1fa

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Analytics/Integrations/Localytics/SEGLocalyticsIntegration.m

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ - (void)start {
4646
SEGLog(@"LocalyticsIntegration initialized.");
4747
}
4848

49-
- (void)setCustomDimensions:(NSDictionary *)dimensions {
49+
- (void)setCustomDimensions:(NSDictionary *)dictionary {
5050
NSDictionary *customDimensions = self.settings[@"dimensions"];
5151

52-
for (NSString *key in dimensions) {
53-
NSNumber *dimension = customDimensions[key];
54-
if (dimension) {
55-
NSString *dimensionValue = [NSString stringWithFormat:@"%@", [dimensions objectForKey:key]];
56-
[Localytics setValue:dimensionValue forCustomDimension:[dimension integerValue]];
52+
for (NSString *key in dictionary) {
53+
if ([customDimensions objectForKey:key] != nil) {
54+
NSString *dimension = [customDimensions objectForKey:key];
55+
[Localytics setValue:[dictionary objectForKey:key]
56+
forCustomDimension:[dimension integerValue]];
5757
}
5858
}
5959
}
@@ -96,7 +96,9 @@ - (void)identify:(NSString *)userId
9696
for (NSString *key in traits) {
9797
NSString *traitValue =
9898
[NSString stringWithFormat:@"%@", [traits objectForKey:key]];
99-
[Localytics setValue:traitValue forProfileAttribute:key withScope:LLProfileScopeApplication];
99+
[Localytics setValue:traitValue
100+
forProfileAttribute:key
101+
withScope:LLProfileScopeApplication];
100102
}
101103
}
102104

0 commit comments

Comments
 (0)