customerio / customerio-reactnative

MIT License
23 stars 11 forks source link

In App Messaging trigger pages condition #88

Closed MatiasLjubica closed 1 year ago

MatiasLjubica commented 1 year ago

Hi team, We are trying to implement the "In-App Message" function which works but there are some details i want to know. As we are using Segment, we are sending data through their screen function. Our Customer account receives the data of Segment including "Page view" event but we are unable to use the "page rules" function on a Customer campaign with this Segment event. When we sending screen event from Customer SDK the page rules works, i compare the payload of both event and i don't see any differences. I think the Customer SDK seems to use the screen function to know locally where the user is to show the message ? We don't to send extra-data to Customer, we all ready sending this data on Segment and we want to keep that way.

It is possible to use Segment event for this ?

Thanks

Shahroz16 commented 1 year ago

Hey @MatiasLjubica, thank you for reaching out.

You are correct, currently, in CIO SDKs, when a user sends in a screen event, we use that set current page/route.

What we can do in the next releases is, If you don't want to send this data, what we can do is provide an additional parameter in the screen method, which takes a boolean track, by default it would be true, but if you set the value to false we would just use it to set the route locally and not track the event in CIO.

Note: Everywhere you are sending the Page view via segment, you will have to call the CIO SDK, screen method, but by providing the track as false there won't be any duplication just the local variable to be updated so the in-app routing works for you.

MatiasLjubica commented 1 year ago

It would be great, thank @Shahroz16

MatiasLjubica commented 1 year ago

Hi @Shahroz16, it is for fixing this issue ?

commit : https://github.com/customerio/customerio-reactnative/commit/07e38f721acb7a613371c2fc3ac6872c3ea8cb38

StephMoreno commented 1 year ago

Hi @MatiasLjubica, Thanks for submitting this feedback! I am a Product Manager for the mobile squad here and will be making note of this request to go through backlog prioritization for a future release. I can circle back here with you once this work has been slotted for commitment to pick up!

Kerumen commented 7 months ago

Hi @StephMoreno. We are also using Segment to send the events to Customer.io and the page rule condition is not working for in-app messaging. We have to manually call CustomerIO.screen method but then we have duplicated events. Were you able to prioritize this? Thanks!

Shahroz16 commented 7 months ago

Hey @Kerumen, thank you for reaching out. We are working on its support and it has been prioritized. Having said that, it's going to take some time before we release it on react native as we are working on its support in other clients too. I'll update here once we do, thanks for your patience.

Meanwhile, maybe just utilize CustomerIO.screen instead of Segment? and forward that data to Segment if needed.?