Skip to content
Sarah Yablok edited this page Mar 18, 2016 · 2 revisions

User can specify the prerequisites and limits for a Pathfora widget. displayConditions define a set of constraints and rules that the widget has to meet in order to be initialized.

Display Conditions

displayConditions can be specified in each widget's configuration, before the widget is initialized.

showOnInit (default: true)

Show the widget immediately after it's initialization (if no other constraints apply).

If set to false, the widget will remain hidden.

showDelay (default: 0)

Show the widget upon a certain delay after the user enters the page.

Delay is specified in seconds. Value 0 will disable this condition.

hideAfter (default: ignored)

Similar to showDelay.

Close the widget upon a certain delay after the user enters the page.

Delay is specified in seconds. Value 0 will disable this condition.

displayWhenElementVisible (default: ignored)

Display the widget after a certain DOM element enters the viewport.

Target element is identified by its id. Empty string or null value will disable this condition.

scrollPercentageToDisplay (default: 0)

Display the widget after a certain percentage of page scroll.

Target percentage should be specified in a range 0-100 as a Number.

pageVisits (default: 0)

Display the widget when the user visits the page a certain amount of times.

Requires cookies enabled.

date (default: ignored)

Display the widget in a specified interval of time.

Widget can be constrained to a specific interval of time, starting on start_at and ending on end_at dates. Both dates should be presented as a String in the ISO date format.

Condition accepts an Object with at least one of the necessary fields:

displayConditions: {
  date: {
    'start_at': '2016-02-15T11:00:00.000Z',
    'end_at': '2016-02-25T11:00:00.000Z'
  }
}

impressions (default: ignored)

Similar to pageVisits.

Display the widget after a certain amount of impressions (either session- or lifetime- specific).

Widget can be constrained to a specific amount of impressions on the user. session counter specifies the number of impressions on the user during one session. total counter specifies the number of impressions on the user from all sessions combined.

Condition accepts an Object with at least one of the necessary fields:

displayConditions: {
  impressions: {
    session: 1,
    total: 10
  }
}

Requires cookies enabled.

hideAfterAction (default: ignored)

Do not display the widget after a certain click action, set the number of actions to hide it after and/or the duration before showing it again.

Condition accepts an Object with at least one of the necessary fields, closed, cancel, or confirm. Each of which is an object with fields hideCount and duration - measured in seconds:

displayConditions: {
  hideAfterAction: {
    closed: {
      hideCount: 3, // Do not hide permanently until the modal have been closed three times
      duration: 604800 // After each close action, do not show the modal until a week later
    },
    confirm: {
      hideCount: 1 // After the user has confirmed once, never show the modal again
    },
    cancel: {
      duration: 1440 // After pressing the cancel button, don't show the modal again until a day later
    }
  }
}

Requires cookies enabled.