3
votes

I am trying to get GA Screens working via Google Tag Manager on iOS. I've configured GTM Tag with the tracking type App View and I am able to see that events are coming but screen name is always (not set)

GA view

I was trying to set different variables/parameters in GTM but haven't succeeded so far. Any ideas?

Thanks.

3

3 Answers

3
votes

That was very complicated and absolutly not documented from google side. You have to configure your tag as App View and add field &cd and set it's value to your screen name. It can be tracked then in real time. gtm panel configuration

Look here for some more context: google documentation for google analytics

0
votes

Here is working code I use.

id tracker = [[GAI sharedInstance] defaultTracker];
[tracker set:kGAIScreenName value:NSStringFromClass([self class])];
[tracker send:[[GAIDictionaryBuilder createAppView] build]];

You should probably use this though:

NSString *screenName = /* YOUR SCREEN NAME HERE */
id tracker = [[GAI sharedInstance] defaultTracker];
[tracker set:kGAIScreenName value:screenName];
[tracker send:[[GAIDictionaryBuilder createAppView] build]];
-2
votes

Code:

[dataLayer push:@{@"event": @"screenView",@"screenName":name}]

enter image description here