div-visibility-action

Actions performed when an element becomes visible.

Parameters

Parameters Description
log_id

string

Required parameter.

Logging ID.

Available platforms: Android, iOS, web.

download_callbacks

object

Callbacks that are called after data loading.

The value has the type div-download-callbacks.

Available platforms: Android, iOS, web.

is_enabled

bool_int

The parameter disables the action. Disabled actions stop listening to their associated event (clicks, changes in visibility, and so on).

Default value: true.

Available platforms: Android, iOS, web.

log_limit

int

Limit on the number of loggings. If 0, the limit is removed.

Restriction for the value x: x >= 0.

Default value: 1.

Available platforms: Android, iOS, web.

payload

object

Additional parameters, passed to the host application.

Available platforms: Android, iOS, web.

referer

string

Referer URL for logging.

The value must be a valid URL.

Available platforms: Android, iOS.

typed

object

The value has the type div-action-typed.

Available platforms: Android, iOS, web.

List of possible values:

  • div-action-animator-start
  • div-action-animator-stop
  • div-action-array-insert-value
  • div-action-array-remove-value
  • div-action-array-set-value
  • div-action-clear-focus
  • div-action-copy-to-clipboard
  • div-action-dict-set-value
  • div-action-focus-element
  • div-action-hide-tooltip
  • div-action-set-state
  • div-action-set-variable
  • div-action-show-tooltip
  • div-action-timer
  • div-action-video
  • url

    string

    URL. Possible values: url or div-action://. To learn more, see Interaction with elements.

    The value must be a valid URL.

    Available platforms: Android, iOS, web.

    visibility_duration

    int

    Time in milliseconds during which an element must be visible to trigger visibility-action.

    Restriction for the value x: x >= 0.

    Default value: 800.

    Available platforms: Android, iOS, web.

    visibility_percentage

    int

    Percentage of the visible part of an element that triggers visibility-action.

    Restriction for the value x: x > 0 && x <= 100.

    Default value: 50.

    Available platforms: Android, iOS, web.

    JSON
    {
      download_callbacks: {
        on_fail_actions: [
          {
            download_callbacks: div-download-callbacks,
            is_enabled: "bool_int",
            log_id*: "string",
            log_url: "string",
            menu_items: [
              {
                action: div-action,
                actions: [ div-action, ... ],
                text*: "string"
              },
              ...
            ],
            payload: "object",
            referer: "string",
            target: "string",
            typed: div-action-typed,
            url: "string"
          },
          ...
        ],
        on_success_actions: [
          {
            download_callbacks: div-download-callbacks,
            is_enabled: "bool_int",
            log_id*: "string",
            log_url: "string",
            menu_items: [
              {
                action: div-action,
                actions: [ div-action, ... ],
                text*: "string"
              },
              ...
            ],
            payload: "object",
            referer: "string",
            target: "string",
            typed: div-action-typed,
            url: "string"
          },
          ...
        ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_limit: "int",
      payload: "object",
      referer: "string",
      typed: div-action-typed,
      url: "string",
      visibility_duration: "int",
      visibility_percentage: "int"
    }