Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InAppMessagingDisplay stops receiving Analytics events when GTM json container is added #4305

Closed
fgulan opened this issue Nov 13, 2019 · 6 comments

Comments

@fgulan
Copy link

@fgulan fgulan commented Nov 13, 2019

[READ] Step 1: Are you in the right place?

I believe I am :)

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 11.1
  • Firebase SDK version: 6.12.0
  • Firebase Component: Analytics, Core, InAppMessagingDisplay, GoogleTagManager (7.1.2)
  • Component version: FirebaseInAppMessaging (0.15.5)

[REQUIRED] Step 3: Describe the problem

InAppMessagingDisplay stops displaying messages triggered by analytics event when Google Tag Manager is used, more correctly when container JSON file is added to project.

From what I debugged, method messageTriggered:parameters: on FIRIAMDisplayCheckOnAnalyticEventsFlow is not invoked on analytics events when mentioned JSON file is included. Not sure what could be the issue but maybe GTM internally swizzle something or doesn't call super implementation, since if I remove JSON container from project that method is invoked and messages are shown.

Steps to reproduce:

I've created example iOS project where you can reproduce the issue: https://github.com/fgulan/fiam-gtm-issue. Google plist and GTM container json are included in project with my test data. Just run the app and you should see the button which triggers analytics event open_fiam which should trigger displaying FIAM banner message with text Test FIAM. But it doesn't since JSON container is added as a reference, just remove it to see the difference.

@google-oss-bot

This comment was marked as resolved.

Copy link

@google-oss-bot google-oss-bot commented Nov 13, 2019

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@christibbs

This comment has been minimized.

Copy link
Contributor

@christibbs christibbs commented Dec 3, 2019

@fgulan looking into this. As a temporary workaround you can trigger the message directly via the InAppMessaging singleton.

InAppMessaging.inAppMessaging().triggerEvent("open_fiam")
@christibbs

This comment has been minimized.

Copy link
Contributor

@christibbs christibbs commented Dec 3, 2019

I debugged this via @fgulan's sample project (needed to create my own project and replace the GoogleService-Info.plist file) and confirmed that the failure point is messageTriggered:parameters: not getting called. So the bug happens on the analytics side before it reaches the in-app messaging SDK.

@paulb777

This comment has been minimized.

Copy link
Member

@paulb777 paulb777 commented Dec 5, 2019

Created internal issue b/145705671

@paulb777 paulb777 removed the needs-triage label Dec 5, 2019
@paulb777 paulb777 added this to the M61 milestone Dec 6, 2019
@paulb777

This comment has been minimized.

Copy link
Member

@paulb777 paulb777 commented Dec 6, 2019

Fix implemented for next release.

@paulb777

This comment has been minimized.

Copy link
Member

@paulb777 paulb777 commented Dec 17, 2019

Fix released with Firebase 6.14.0

@paulb777 paulb777 closed this Dec 17, 2019
@firebase firebase locked and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.