Closed psimk closed 1 year ago
Hi @psimk depending on the In-app message type (Modal, Fullscreen, HTML, etc.) you can log clicks accordingly.
Since you're using your own UI, you're correct there's no dismiss method. So in addition to hiding/removing your message UI yourself, it sounds like you're looking for one of the following methods to log a click for analytics purposes:
logInAppMessageButtonClick
will log button 1 or 2.
logInAppMessageClick
logs a "body" click.
For HTML in-app messages, you can use logInAppMessageHtmlClick
which lets you log any arbitrary button name (i.e. "closed message" or "clicked some button")
Let me know if that helps answer your question.
I understand that we can log button clicks with logInAppMessageButtonClick, log body clicks with logInAppMessageClick and handle HTML in-app-message clicks with logInAppMessageHtmlClick.
However, there still is no function that we can call to log in-app-message dismissals. Is this something that the Braze SDK could implement? I understand the functionality already exists internally, it is just not exposed to us.
Hi @psimk. Are you trying to log dismissal events to the backend? If so, in-app message dismissal events are not actually logged to the backend (unlike content cards). They exist so that users of the built-in UI can be notified through subscribeToDismissedEvent
that the user has closed the message.
Are you trying to log dismissal events to the backend?
Yes, that's what we're trying to do. We want to see how many users have dismissed the message.
@psimk Unfortunately the backend does not support this as a built-in event. You can log it as a custom event and create your own analytics or you can submit product feedback that you would like this functionality to be added. I'm going to close out the issue since this is a more general product request rather than an SDK request.
What problem are you facing?
When using my own custom in-app-message UI, I am unable to log "close message" events.
Workarounds
N/A
Ideal Solution
A separately importable function that would let me pass an in app message, and send out a "close message" event for it:
This would be mimicking the content card utility -
logCardDismissal
.Other Information
As I understand, there exists
inAppMessage.closeMessage()
, but it only works when we are using the Braze UI.