Skip to main content

EUID Integration Overview for Prebid.js

This guide is an overview of integration options for publishers who want to integrate with EUID and generate EUID tokens (advertising tokens) to be passed by Prebid.js in the RTB bidstream.

Introduction

EUID provides a Prebid.js module that supports the following:

For additional flexibility, EUID also provides alternative methods for some of the features and complementary products, such as a JavaScript SDK.

CAUTION: EUID is designed to be used only where GDPR applies. The module checks the consent data that's passed in, and operates only if the gdprApplies flag is set to true.

Generating the EUID Token

Depending on access to personal data, there are two methods to generate EUID tokens for use with Prebid.js, as shown in the following table.

Determine which method is best for you, and then follow the applicable integration guide.

ScenarioIntegration Guide
You have access to personal data on the client side and want to do front-end development onlyEUID Client-Side Integration Guide for Prebid.js
You have access to personal data on the server side and can do server-side developmentEUID Server-Side Integration Guide for Prebid.js

Refreshing the EUID Token

The Prebid.js EUID module can automatically refresh the EUID tokens. If you prefer to implement manual refresh outside Prebid.js, see Refreshing an EUID Token in the Server-Side Integration Guide. The client-side integration solution includes automated token refresh.

Storing the EUID Token in the Browser

By default, the EUID module stores data using local storage. To use a cookie instead, set params.storage to cookie, as shown in the following example.

For details, see European Unified ID Configuration in the Prebid documentation.

pbjs.setConfig({ 
userSync: {
userIds: [{
name: 'euid',
params: {
// default value is 'localStorage'
storage: 'cookie'
}
}]
}
});

The cookie size can be significant, which could be a problem. However, if local storage is not an option, this is one possible approach.

Passing the EUID Token to the Bidstream

To configure the EUID module, call pbjs.setConfig. For details on supported parameters, refer to the guide that applies to your implementation:

When the EUID module is configured, it manages an EUID token for the user and stores it in the user's browser.

When generating tokens with Client Refresh mode on the client side or on the server side, the module automatically takes care of refreshing the token as long as your site is open in the user's browser. However, you also have the option to manage the token refresh on the server side. For details, see Refreshing an EUID Token in the Server-Side Integration Guide. The client-side integration solution includes automated token refresh.

Integration Overview: High-Level Steps

At a high level, to integrate your site with EUID using Prebid.js, you'll need to complete the following steps:

  1. Complete EUID account setup.
  2. Add Prebid.js to your site.
  3. Configure the EUID module.

For detailed instructions, refer to one of the following integration guides: