CleverTap / clevertap-android-sdk

CleverTap Android SDK
MIT License
80 stars 74 forks source link

Multiple native Display Campaigns on a single event #380

Closed walaankit closed 1 year ago

walaankit commented 1 year ago

Describe the bug We created multiple native display campaigns on a single event Home Screen Loaded. And registered setDisplayUnitListener callback in our activity. When the event Home Screen Loaded is pushed, we received only a single CleverTapDisplayUnit in the onDisplayUnitsLoaded(units: ArrayList<CleverTapDisplayUnit>?) callback. This happens even when the user is qualified for multiple Native Display campaigns configured.

To Reproduce Steps to reproduce the behavior:

  1. Register setDisplayUnitListener in Activity and implement it.
  2. Push an event named Home Screen Loaded in onCreate of that activity
  3. Go to Campaigns in clevertap dashboard and create multiple native display campaigns against this event Home Screen Loaded
  4. Test the display units recieved in onDisplayUnitsLoaded callback

Expected behavior When where there are multiple native diplay campaings running parallely for which a user qualifies, all the display units of these campaigns should be received in the onDisplayUnitsLoaded callback. As event its signature (units: ArrayList<CleverTapDisplayUnit>?)shows that it can receive a list of units instead of a single one.

Screenshots Even your documentation says that you will receive all active native display campaigns after pushing the event.

Screenshot 2023-01-20 at 2 55 57 PM

Environment (please complete the following information):

As per our use case, we want to run multiple native display campaigns on a single triggering event say Home Screen Loaded. These campaigns can have different segments created based on past behaviour. A user may qualify for some of these campaigns and only the images in these campaigns need to be shown to the user on home screen.

darshanclevertap commented 1 year ago

@walaankit What you have described as a bug is the expected behavior. Raising one event will only send one Native Display Campaign in the response from our server similar to InApp Notifications. There seems to be some mismatch of expectations.

To achieve your use case, it would be recommended you raise multiple events as per the user's behavior and then create specific campaigns for each of these events. All these events can be done on the same screen/launch of the first screen to achieve your use case.

darshanclevertap commented 1 year ago

@walaankit If you have more questions, I would suggest that you raise a support ticket to our team via the CleverTap dashboard and mention this GitHub issue to expedite. Support Ticket from CleverTap Dashboard

debugger22 commented 1 year ago

@darshanclevertap Thanks fo the clarification!

To achieve your use case, it would be recommended you raise multiple events as per the user's behavior and then create specific campaigns for each of these events. All these events can be done on the same screen/launch of the first screen to achieve your use case.

This unnecessarily increases the number of events that we push to Clevertap. If multiple campaigns can accept the same triggering event, why can't the backend send them together?

debugger22 commented 1 year ago

As @walaankit mentioned in the first comment -

As per our use case, we want to run multiple native display campaigns on a single triggering event say Home Screen Loaded. These campaigns can have different segments created based on past behaviour. A user may qualify for some of these campaigns and only the images in these campaigns need to be shown to the user on home screen.

This is a pretty generic use case IMHO.

darshanclevertap commented 1 year ago

@walaankit @debugger22 I understand the ask but more than an SDK thing, this is a product request as the current implementation serves only one campaign at a time for one event. Hence my request is to raise a support ticket with us so that I can escalate this to the correct team internally.

walaankit commented 1 year ago

Have raised the following ticket regarding the same: https://help.clevertap.com/hc/en-us/requests/118170

darshanclevertap commented 1 year ago

@walaankit Your CSM will be responding to the support ticket raised. I just wanted to let you know that I'm closing this for now. Please reopen this if you do not get any update on your support ticket within 24-48 hours and I will escalate this internally.