Closed markhayden closed 3 years ago
@markhayden as noted today in the docs, total
is not supported at the global level, is that a problem pertaining to this feature request?
jk, I missed this in the PR description. :facepalm:
In the above example, we'd need to extend the existing "total" option to support the global setting
@markhayden Just clarifying this config you provided:
displayConditions: {
impressions: {
widget: {
total: 1,
duration: 3600 // seconds
},
global: {
total: 1,
duration: 3600 // seconds
}
}
}
should actually mean: "I want to prevent this modal from showing for 24 hours after any modal gains an impression".
But applied to the global account config under the generic
key this would mean: "I want to prevent any modal from showing for 24 hrs after any modal has gained an impression".
We currently have a display condition to prevent a modal from showing more than X times per session. This setting is either executable at the single modal layer (only limit this modal to one per session) or at the global layer across all modals (only allow one impression from any modal during this session).
Unfortunately, the session has proven to be problematic for a few reasons:
As an alternative, we would like to give control over the duration as part of the definition. So the statement becomes "hide this modal for this period of time after this number of impressions". Said rule would then adhere to both individual modal or global capabilities like session ("I want to prevent any modal from showing for 24 hours after this modal gains an impression")
The actual JSON definition would look something like this:
In the above example, we'd need to extend the existing "total" option to support the global setting and then introduce a duration setting. if the duration was not set it would default to the existing session setting which would maintain backward compatibility.
Finally, this setting should also be added to the app UI as a manageable display condition from the Experience Wizard.