3
votes

I set up a universal analytics event tag in tag manager + a firing rule + data layer variable macros (for category, action, label and value). I published the container and I'm push data to GTM like this in my iOS app:

[self.tagManager.dataLayer push:@{@"event":           @"userAction",
                                  KEY_EVENT_CATEGORY: @"home",
                                  KEY_EVENT_ACTION:   @"refresh",
                                  KEY_EVENT_LABEL:    @"",
                                  KEY_EVENT_VALUE:    @"" }];

I enabled the verbose logging and I can see the analytics lib dispatching the hit.

But nothing shows up in the real-time event section of google analytics.

Does anyone have a clue about what could be wrong?

I 'm using the GoogleAnalytics-iOS-SDK version 3.0.3c which includes analytics and tag manager.

1

1 Answers

1
votes

OK found it.

The event value MUST be a number and it cannot be empty if it exists.

So if you don't need a value then don't set anything for the Value field in the Universal Analytics Tag.

If you occasionally need a value and you use a data layer variable macro to get it then make sure to set a numerical default value in the macro.