Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lockr AIM #5278

Merged
merged 8 commits into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions dev-docs/modules/userid-submodules/lockraim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
layout: userid
title: lockr AIM
description: lockr Alternative Identity Manager sub-module
useridmodule: lockrAIMIdSystem
---

Alternative Identity Manager (AIM) is a unified container for identity and data management.
AIM includes a self-service platform for publishers to seamlessly integrate and activate alternative IDs like LiveRamp’s Authenticated Traffic Solution (ATS), Unified ID 2.0 (UID2), and ID5. The self-service component allows the publisher to easily enable or disable IDs and to send identity clusters to CDPs or cleanrooms without engaging engineering teams. For more information about AIM and detailed integration docs, please visit [our documentation](https://sso.loc.kr/api/lockr_reference.html#tag/Alternate-Identity-Management-(AIM)).

### **Account Creation | AIM**

1. Sign up for an [Identity lockr account.](https://sso.loc.kr/console/signup)
2. Setup your app and activate the AIM library.
3. Compile Prebid with the appropriate configurations, and deploy.

### **Configuration | AIM**

Add the lockr’s AIM submodule to your Prebid.js package by running:

```sh
gulp build –modules=lockrAIMIdSystem,...
```

The following configuration parameters are available:
bretg marked this conversation as resolved.
Show resolved Hide resolved
{: .table .table-bordered .table-striped }
| Param | Scope | Type | Description | Example |
|----------------|----------|--------|----------------------------------------|-----------------------|
| name | Required | String | The name of this module: `"lockrAIMId"`| `"lockrAIMId"` |
| params | Required | Object | Details for the configuration. | |
| params.email | Required | String | Email address for identity tokens. | `test@example.com` |
| params.appID | Required | String | Identity lockr appID | `e84afc5f-4adf-4144-949f-1de5bd151fcc` |

**Google oAuth:**
If you are using Google oAuth (_as an example_), the onSignIn function will subsequently call window.lockr.setAdditionalData function and include a raw email.

```javascript
function onSignIn(googleUser) {
pbjs.setConfig({
userSync: {
userIds: [{
name: 'lockrAIMId',
params: {
email: 'john@example.com',
appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc'
}
}]
}
});
}
```

**Facebook oAuth:**
If you are using Facebook Login (_as an example_), the statusChangeCallback function will subsequently call window.lockr.setAdditionalData function and include a raw email.

```javascript
function statusChangeCallback(response) {
console.log('statusChangeCallback');
console.log(response);
if(response.status === 'connected'){
pbjs.setConfig({
userSync: {
userIds: [{
name: 'lockrAIMId',
params: {
email: 'john@example.com',
appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc'
}
}]
}
});
}else{
document.getElementById('status').innerHTML = 'Please login';
}
}
```

**Note:** The above code can be triggered from anywhere on the domain (i.e. a subscription form).
bretg marked this conversation as resolved.
Show resolved Hide resolved

**lockr AIM Example**

```javascript
pbjs.setConfig({
userSync: {
userIds: [{
name: 'lockrAIMId',
params: {
email: 'test@example.com',
appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc'
}
}]
}
});
```

_Note_: lockr’s AIM self-service interface empowers publishers with the ability to pass the alternative IDs activated back to the client as local storage or as a first party cookie. Each Identity Provider can be individually set to restrict from client-side delivery and instead be retained as an authentication event within Identity lockr. In this case no data is lost, but instead maintained for automated or manual sharing to any Data Endpoint.

**Troubleshooting and Error handling:**

1. Navigate to the domain where Prebid.js Library is integrated.
2. Go to the 'Network' tab of your Developer Tools. Search for “prebid.js”
3. In the application tab, you can confirm any activated Identity Provider (if client-side storage is turned on in AIM’s Identity Provider settings).
4. Debugging:
Enable the debug flag to true in the setConfig call:

```javascript
pbjs.setConfig({
debug: true,
userSync: {
userIds: [{
name: 'lockrAIMId',
params: {
email: 'test@example.com',
appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc'
}
}]
}
});
```
Loading