Additional features

Overview

When using Taboola Web Push, you can optionally enable certain additional features, on a case-by-case basis.

🚧

Additional features are not enabled by default. To enable a given feature for your account, reach out to your Taboola Account Manager.

Additional features

Backdrop

Once enabled, the backdrop feature allows you to gray out your page, until the user responds to the notification pop-up. This draws attention to the pop-up, increasing user engagement.

📘

The backdrop effect is applied for 4 seconds. If the user does not respond within that time, the effect is removed.

To enable the backdrop effect:

  1. Reach out to your Taboola Account Manager to enable this feature for your account.
  2. Let your account manager know if the backdrop effect should be the default behavior.
    1. If yes:

      The effect will be applied for all Taboola push notifications under your domain. No further action is required.

    2. Else:

      Add the following code snippet the relevant pages only:

      <script>
       window._taboola_notifications = window._taboola_notifications || [] 
       window._taboola_notifications.push({enableFeature: 'backdrop'})
      </script>
      📘

      If a given page contains a Taboola push notification, as well as the above script, the backdrop effect will be applied.

User Segmentation

Set user segments to target users with specific Taboola Push notifications.

🚧

Important: Three rules every integration must follow

  • Run the snippet on every page, for every visitor (logged in or not, subscriber or not), not only on pages where segmented users go.
  • Send every key you use on every page. If a visitor has no value for a key, send 'unset' for that key.
  • Never send an empty value to clear a segment. '', null, and undefined are ignored, and the user keeps their previous value. Send 'unset' instead.

Set user segments (setUserData)

Use setUserData to set several segments for a user. Taboola saves each segment in the user's data and updates it each time the snippet runs.

  1. Choose the segment keys and values you want to send.

    📘

    Note: Contact your Taboola Account Manager and share every segment key and every value you plan to send. Taboola needs to add these keys and values to the Newsroom Push platform before you can select them as targeting options. Setting a value in the snippet alone does not make it available as a targeting option.

  2. Add the following snippet to every page. Replace the example values with the visitor's current values. See Users without a segment for visitors who have no value for a key.

    <script>
     window._taboola_notifications = window._taboola_notifications || []
     window._taboola_notifications.push({
       setUserData: { userTier: 'premium', plan: 'annual', section: 'sports' }
     })
    </script>

    This sets three segments for the user: userTier to 'premium', plan to 'annual', and section to 'sports'.

  3. Follow these rules for each entry:

    ItemRequirements
    Segment keyChoose a name up to 50 characters long. Use only letters, digits, _, and -. Spaces and dots are not supported. Keys are case-sensitive: 'userTier' and 'usertier' are different keys. Use exactly the key names you registered.
    Reserved keysThese key names are reserved by Taboola and are ignored with a console error, regardless of upper/lower case: is_push_delivery_active, gdprApplies, daisyBit, ccpa_privacy_string, ccpa_do_not_sell, gpp_string, gpp_sid.
    Segment valueSend a single string, number, or boolean, up to 100 characters long. Numbers and booleans are stored as text: 2 becomes "2" and true becomes "true". Values are case-sensitive and must match exactly what was registered: 'Premium' and 'premium' are different values.
    Values per keyEach user has exactly one value per key. Arrays and objects are not supported.

If an entry is invalid, Taboola ignores only that entry and reports an error in the browser console. The other valid entries are still saved.

Sending a key again overwrites its previous value. Keys you do not send keep their previous values.

When a push notification targets several segments, a user must match all of them.

Users without a segment (required)

Use 'unset' when a visitor has no value for a key, including when a previous value no longer applies—for example, after a subscriber cancels:

<script>
 window._taboola_notifications = window._taboola_notifications || []
 window._taboola_notifications.push({
   setUserData: { userTier: 'premium', plan: 'unset', section: 'unset' }
 })
</script>

This keeps the user in the 'premium' tier, and they no longer match any plan or section targeting. There is no delete method.

🚧

Important: 'unset' is reserved and must be lowercase. It is never a targeting option. Do not use it as a real segment value or ask your Taboola Account Manager to register it.

Segments update only when the snippet runs. A user who does not return to your site keeps their last values.

If you learn a segment value only after the page loads—for example, after login or after login state loads asynchronously—push the snippet once the real value is known. Do not push a placeholder first.

Push the snippet again whenever a segment changes, including login, logout, upgrade, or cancellation.