Passing first-party publisher data

Pass user identifiers and attributes to enrich recommendations

Introduction

Pass your first-party user data to Taboola to enable cross-device identification, better recommendations, and richer audience insights.

Add a _taboola.push() call with your data before the flush command in your loader tag.

Quick start

<script>
  window._taboola = window._taboola || [];

  // Pass user identifiers
  _taboola.push({
    eids: [
      { source: "publisher.com", uids: [{ id: "hashed-email-or-id", atype: 3, ext: "hemsha256" }] }
    ]
  });

  _taboola.push({ article: "auto" });
</script>
๐Ÿ“˜

What are eids?

Extended identifiers (eids) let you pass one or more user IDs from any identity provider in a single push. The format follows the OpenRTB user.eids specification.

User identifiers (eids)

Each entry identifies a provider (source) and its user IDs (uids):

<script>
  _taboola.push({
    eids: [
      { source: "publisher.com", uids: [
        { id: "abc123", atype: 3, ext: "hemsha256" },
        { id: "visitor-id-456", atype: 3, ext: "ppid" }
      ]},
      { source: "another-provider.com", uids: [{ id: "xyz789", atype: 1 }] }
    ]
  });
</script>
FieldRequiredDescription
sourceYesIdentity provider domain
uids[].idYesThe user ID value
uids[].atypeYesNumeric ID type (per OpenRTB spec)
uids[].extYesID type identifier (e.g. "hemsha256" for SHA-256 hashed email)
๐Ÿ“˜

Implementation values

Contact your Taboola account manager or Publisher Solutions representative for the correct atype and ext values for your specific use case.

๐Ÿšง

PII must be hashed

If the id is derived from PII (e.g. email), it must be hashed with SHA-256 before passing. Never send raw email addresses. Only push identity data when you have the user's consent โ€” Taboola respects consent signals (GDPR/TCF, CCPA/GPP) and will not process identity data when consent is missing.

Hashing example

async function hashEmail(email) {
  var normalized = email.trim().toLowerCase();
  var encoder = new TextEncoder();
  var data = encoder.encode(normalized);
  var hashBuffer = await crypto.subtle.digest("SHA-256", data);
  var hashArray = Array.from(new Uint8Array(hashBuffer));
  return hashArray.map(function(b) {
    return b.toString(16).padStart(2, "0");
  }).join("");
}

hashEmail("[email protected]").then(function(hash) {
  _taboola.push({
    eids: [{ source: "publisher.com", uids: [{ id: hash, atype: 3, ext: "hemsha256" }] }]
  });
});
<?php
$hashedId = hash('sha256', strtolower(trim($userEmail)));
?>
<script>
  _taboola.push({
    eids: [{ source: "publisher.com", uids: [{ id: "<?php echo $hashedId; ?>", atype: 3, ext: "hemsha256" }] }]
  });
</script>
๐Ÿ“˜

Server-side hashing

Server-side hashing is recommended because it avoids exposing the raw email in client-side code.

Limits

  • Up to 5 sources and 5 identifiers per source (configurable).
  • Invalid entries are filtered out automatically.

User type

Identify the user subscription or membership segment:

<script>
  _taboola.push({ user_type: "subscriber" });
</script>
ValueDescription
guestAnonymous or non-logged-in visitor
registeredLogged-in user with a free account
subscriberPaid subscriber

Any other value is treated as other.

Device ID

For mobile app or WebView environments where cookies are not available:

<script>
  _taboola.push({ device: "8b40671d-2b31-4548-a0ca-c0045432a821" });
</script>
๐Ÿ“˜

Mobile SDK

This field is typically set automatically by the Taboola Mobile SDK. Manual usage is only needed for custom WebView integrations.

Validation

Open DevTools -> Network, filter for trc requests. In the data parameter, look for:

Push fieldTRC key
eidseids
user_typeusrtyp
devicedid

Common mistakes

IssueFix
Data not in TRC requestMove _taboola.push() calls before the flush command.
Raw email in requestHash PII-based identifiers with SHA-256 before pushing.
user_type shows as otherUse exactly guest, registered, or subscriber.
eids not in TRC requestContact your Taboola account manager to enable the feature.

Complete example

<script type="text/javascript">
  window._taboola = window._taboola || [];

  // First-party user data
  _taboola.push({
    eids: [
      { source: "publisher.com", uids: [{ id: "973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b", atype: 3, ext: "hemsha256" }] }
    ]
  });
  _taboola.push({ user_type: "subscriber" });

  // Page type
  _taboola.push({ article: "auto" });

  // Placement
  _taboola.push({
    mode: "thumbnails-a",
    container: "taboola-below-article",
    placement: "Below Article Thumbnails"
  });
  _taboola.push({ target_type: "mix" });
  _taboola.push({ flush: true });

  // Loader
  (function (e, f, u, i) {
    if (!document.getElementById(i)) {
      e.async = 1; e.src = u; e.id = i;
      f.parentNode.insertBefore(e, f);
    }
  })(
    document.createElement("script"),
    document.getElementsByTagName("script")[0],
    "//cdn.taboola.com/libtrc/<publisher-id>/loader.js",
    "tb_loader_script"
  );
</script>