4
votes

I installed Firebase SDK to my project. I'm using Firebase "logEventWithName" method to send event to GTM. I see that events are logged. I see output in debug console in xcode.

016-06-30 14:49:13.991 Reztoran[47264:3499021] GoogleTagManager info: Processing logged event: pageView with parameters: {
pageName = Restaurant;
}
2016-06-30 14:49:13.995 Reztoran[47264:3499021] GoogleTagManager info: Sending universal analytics hit: {
"&t" = screenview;
"&tid" = "xxxxxxxxxxx";
}
2016-06-30 14:49:13.997 Reztoran[47264:] <FIRAnalytics/DEBUG> Logging event: origin, name, params: app+gtm, pageView, {
    "_o" = "app+gtm";
    pageName = Restaurant;
}
2016-06-30 14:49:14.079 Reztoran[47264:] <FIRAnalytics/DEBUG> Event logged. Event name, event params: pageView, {
    "_o" = "app+gtm";
    pageName = Restaurant;
}

I created a Trigger which fires on when Event Name equals to pageView and I created a Google Analytics tag that's Track Type is ScreenView and fires on the event that I created.

I could not see any data in Google Analytics however I can see all the events and data in firebase console.

What could be the reason of this problem?

2
Hello, have you found the problem? Regards - ergunkocak

2 Answers

2
votes

I don't have experience with Firebase, but I use Google Tag Manager to Implement Google Analytics I attached images you can see how i created (Variable, Trigger, Tag, please consider red rectangles others are extra) in google tag manager account, below is the code i use in page life cycle methods (viewDidAppear and viewWillDisappear) and please make sure downloaded the correct container. enter image description hereenter image description hereenter image description hereenter image description here

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

    // The container should have already been opened, otherwise events pushed to
    // the data layer will not fire tags in that container.
    TAGDataLayer *dataLayer = [TAGManager instance].dataLayer;
    [dataLayer push:@{@"event": @"openScreen1", @"screenName": @"Wellcome Screen"}];

}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    //[Utils pushCloseScreenEventWithScreenName:@"CategoryViewScreen"];

    TAGDataLayer *dataLayer = [TAGManager instance].dataLayer;
    [dataLayer push:@{@"event": @"closeScreen", @"screenName": @"Wellcome Screen"}];

}

Below are the screen shots of reflected results on GOOGLE ANALYICS enter image description hereenter image description here

0
votes

GoogleAnalytics screen views require a screen name (the content description variable cd). Another thing to keep in mind is that Google Analytics sends data in batches, so it can take minutes before screen views show up in real time.