Ad Targeting with Google Ad Manager and Prebid

Overview

UniSignIn can share the Segments a visitor belongs to with your ad stack, so advertisers can buy your first-party audiences without third-party cookies. It works for anonymous visitors and logged-in users.

The UniSignIn tag passes the visitor's segment IDs to:

  • Google Ad Manager: as the page-level key-value unis_seg
  • Prebid.js: as first-party user data in ortb2.user.data, under the provider name unisignin

Enable it

Sharing segments with ad systems is opt-in per project.

  1. Go to Projects, edit the project and turn on Share Segments with Ads.
  2. Save. Segments of the project, and segments set to All projects, are shared from the next page views.

The tag sets the key-value before your ad requests are sent:

googletag.pubads().setTargeting('unis_seg', ['589ad04d06', '83bad30de5'])
  1. In Google Ad Manager go to Inventory → Key-values and create the key unis_seg (dynamic values, or predefined values with your segment IDs).
  2. Target line items with unis_seg is SEGMENT_ID. The segment ID is shown on the segment's page in UniSignIn.

Prebid.js

The tag merges the segments into the Prebid config, keeping data from other providers:

pbjs.mergeConfig({
  ortb2: {
    user: {
      data: [{ name: 'unisignin', segment: [{ id: '589ad04d06' }, { id: '83bad30de5' }] }],
    },
  },
})

Bidders that read ortb2.user.data receive the segments with each bid request.

Reading the segments on the page

The current segment IDs are also available to your own code:

window.unisignin.segments // ['589ad04d06', '83bad30de5']

Segments follow the visitor's current behaviour, and the first ad request of a page already carries them.

  • Where GDPR applies, segments are only shared with consent for TCF purposes 1 and 4.
  • With a TCF consent tool on the page, the tag waits for the consent signal before sharing.
  • Without a GDPR signal, segments are shared.

Stay ahead in first-party data

Identity, consent, audience, and subscription insights for publishers. A few emails a month, no spam.

By subscribing you agree to our privacy policy.