What exactly is Prebid "userSync"?
- User
What exactly is Prebid "userSync"?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
What exactly is Prebid "userSync"?
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
In Prebid.js, "userSync" refers to the process of synchronizing user identifiers across different ad tech platforms (like DSPs and SSPs) through cookies or other means. This synchronization is crucial for enabling demand partners to recognize users consistently and bid on their inventory in programmatic advertising.
userSync?The userSync object in Prebid.js allows publishers to control how and when demand partners synchronize their user IDs with the browser. It's part of the configuration passed into pbjs.setConfig({ userSync: { ... } }).
This feature ensures that ad exchanges and DSPs can associate a cookie ID they've set in the browser with their internal user ID, which helps them target ads more effectively.
Without proper syncing, a DSP might not know who the user is and may not bid—or bid less—on an impression.
User sync typically happens after auction results are returned from bidders. At that time:
userSync Configurationpbjs.setConfig({
userSync: {
userIds: [{
name: 'pubCommonId',
params: {
storage: {
type: 'cookie',
name: '_pubcid',
expires: 60
}
}
}],
syncDelay: 3000,
auctionDelay: 500,
syncEnabled: true,
serverSideStorageOverride: false
}
});
| Parameter | Description |
|---|---|
userIds | Array of user ID modules to enable (e.g., PubCommonID, UnifiedId, etc.) |
syncDelay | Delay (ms) before firing user sync pixels after the auction ends |
auctionDelay | Time (ms) to delay the auction to allow user ID fetching |
syncEnabled | Whether to allow user syncs at all |
serverSideStorageOverride | Use server-side storage instead of client-side (cookies/localStorage) |
PubCommonId, UnifiedId, IdentityLink, etc., to manage persistent user IDs.userSync in Prebid.js is a mechanism for ensuring that demand partners (bidders) can identify users across domains and sessions. This improves targeting, bidding accuracy, and ultimately revenue. Publishers configure how and when these syncs occur using the userSync config block.
Let me know if you'd like a breakdown of how to implement this in your site or debug sync issues!
what's a userSync in relation to an identity module?
Great question!
In the context of Prebid.js, the relationship between userSync and an identity module is closely tied to how user identifiers are obtained, stored, and shared with demand partners during the programmatic ad auction.
Let’s break it down:
A User Identity Module (or just "Identity Module") in Prebid.js is a component that fetches or generates a persistent user identifier. This ID helps DSPs (demand partners) recognize users across different websites and sessions.
pubCommonId: Uses PubCommonID for cross-domain user identification.unifiedId: Uses The Trade Desk's Unified ID 2.0.liveIntentId: Uses LiveConnect ID from LiveRamp.identityLink: Uses InfoSum’s Identity Link.netId: From Neustar.criteo: Criteo’s User ID solution.These modules typically work by:
userSync in Relation to That?The userSync configuration in Prebid.js controls how and when identity syncing happens — especially cookie-based synchronization with demand partners.
When you're using an identity module like unifiedId, the module may need to sync its ID with the DSPs via cookie matching. That’s where userSync comes in.
userSync| Aspect | Identity Module | userSync |
|---|---|---|
| Purpose | Fetch/generate a user ID | Control syncing of IDs with bidders |
| How It Works | Retrieves ID from a service (e.g., TTD, LiveRamp) | Loads pixels/iframes to sync cookies with bidders |
| Storage | Stores ID in cookie, localStorage, etc. | May trigger syncing pixels after auction |
| Dependency | Often uses userSync settings to time syncs | Coordinates syncing across all enabled bidders |
You enable the unifiedId module in your config:
pbjs.setConfig({
userId: {
unifiedId: {
URL: 'https://id-sync-url.com'
}
}
});
During page load, Prebid makes a request to get the Unified ID.
Once the ID is retrieved, it's stored in a cookie (_unifiedid).
After the auction finishes, Prebid checks if bidders need to sync their cookies with this ID.
If allowed via userSync, Prebid loads a pixel from each bidder’s domain to sync the user.
The bidder sets a cookie mapping their internal ID to the Unified ID.
userSync Affects Identity SyncingYou can control this behavior with the userSync object:
pbjs.setConfig({
userSync: {
syncDelay: 3000,
syncEnabled: true,
iframeEnabled: true,
pixelEnabled: true
}
});
syncDelay: Delay before syncing after auction ends.iframeEnabled / pixelEnabled: Choose which syncing method to allow.syncEnabled: Enable or disable syncing entirely.Some identity modules also rely on these settings to know when and how to perform their own syncs.
| Concept | Explanation |
|---|---|
| Identity Module | Gets and stores a persistent user ID (like Unified ID or PubCommonID) |
userSync | Controls how and when those IDs are synced with bidders using cookies or other methods |
| Together | Identity modules provide the ID; userSync ensures that ID is shared with demand partners |
Make sure you're respecting GDPR/CCPA consent signals when enabling identity modules and syncing. Many identity modules require valid consent before syncing or storing IDs.
If you want, I can show you how to configure specific identity modules like Unified ID 2.0 with proper userSync settings!