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 OpenRTBuser.eidsspecification.
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>| Field | Required | Description |
|---|---|---|
source | Yes | Identity provider domain |
uids[].id | Yes | The user ID value |
uids[].atype | Yes | Numeric ID type (per OpenRTB spec) |
uids[].ext | Yes | ID type identifier (e.g. "hemsha256" for SHA-256 hashed email) |
Implementation valuesContact your Taboola account manager or Publisher Solutions representative for the correct
atypeandextvalues for your specific use case.
PII must be hashedIf the
idis 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 hashingServer-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>| Value | Description |
|---|---|
guest | Anonymous or non-logged-in visitor |
registered | Logged-in user with a free account |
subscriber | Paid 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 SDKThis 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 field | TRC key |
|---|---|
eids | eids |
user_type | usrtyp |
device | did |
Common mistakes
| Issue | Fix |
|---|---|
| Data not in TRC request | Move _taboola.push() calls before the flush command. |
| Raw email in request | Hash PII-based identifiers with SHA-256 before pushing. |
user_type shows as other | Use exactly guest, registered, or subscriber. |
eids not in TRC request | Contact 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>Updated about 4 hours ago
