You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><code>pbjs.mergeConfig(uidConfig)</code> - Merges ${IDENTITY_NAME} user ID module configuration into the existing Prebid config without overwriting other settings. This allows adding ${IDENTITY_NAME} after the page has already loaded.</li>
289
+
<li><code>pbjs.refreshUserIds()</code> - Triggers Prebid to re-fetch all configured user IDs, including the newly added ${IDENTITY_NAME} module, which initiates token generation using the provided email and CSTG credentials.</li>
291
290
</ol>
292
291
</div>
293
292
@@ -384,50 +383,51 @@ <h3>📄 Config Merged via mergeConfig()</h3>
384
383
385
384
<!-- Sidebar for Instructions -->
386
385
<asideclass="sidebar">
387
-
<h3>📋 Deferred Loading Flow</h3>
386
+
<h3>📋 How to Test</h3>
388
387
389
388
<divclass="section">
390
-
<h4>Step 1: Page Loads</h4>
389
+
<h4>Step 1: Observe Initial State</h4>
391
390
<ul>
392
-
<li>Prebid.js loads and initializes</li>
393
-
<li><code>setConfig()</code> is called <strong>without</strong> ${IDENTITY_NAME}</li>
391
+
<li>Notice the "Initial Prebid Config" box shows no userIds configured</li>
392
+
<li>This demonstrates Prebid loading without ${IDENTITY_NAME}</li>
394
393
<li>Ads can still be requested (without ${IDENTITY_NAME} targeting)</li>
395
394
</ul>
396
395
</div>
397
396
398
397
<divclass="section">
399
-
<h4>Step 2: User Action</h4>
398
+
<h4>Step 2: Configure ${IDENTITY_NAME}</h4>
400
399
<ul>
401
-
<li>User logs in, gives consent, or other trigger</li>
402
-
<li>Your code calls <code>mergeConfig()</code> with ${IDENTITY_NAME} params</li>
403
-
<li>Then calls <code>refreshUserIds()</code></li>
400
+
<li>Enter an email address in the input field</li>
401
+
<li>Click "Configure ${IDENTITY_NAME} with mergeConfig()" button</li>
402
+
<li>This adds ${IDENTITY_NAME} to the existing Prebid config</li>
404
403
</ul>
405
404
</div>
406
405
407
406
<divclass="section">
408
-
<h4>Step 3: Token Generated</h4>
407
+
<h4>Step 3: Observe Token Generation</h4>
409
408
<ul>
410
-
<li>${IDENTITY_NAME} token is generated</li>
411
-
<li>Token stored in localStorage</li>
412
-
<li>Future ad requests include ${IDENTITY_NAME}</li>
409
+
<li>Check "Integration Status" table for token values</li>
410
+
<li>Verify "Ready for Targeted Advertising" changes to "yes"</li>
411
+
<li>See the merged config displayed at the bottom</li>
413
412
</ul>
414
413
</div>
415
414
416
-
<divclass="section highlight-section">
417
-
<h4>🔑 Key APIs Used</h4>
415
+
<divclass="section">
416
+
<h4>Step 4: Test Opt-Out</h4>
418
417
<ul>
419
-
<li><code>pbjs.mergeConfig()</code> - Add/update config without replacing</li>
420
-
<li><code>pbjs.refreshUserIds()</code> - Trigger user ID module refresh</li>
418
+
<li>Clear ${IDENTITY_NAME} and try: <strong>[email protected]</strong></li>
419
+
<li>Advertising token shows "This email has opted out"</li>
420
+
<li>No advertising token is stored</li>
421
421
</ul>
422
422
</div>
423
423
424
424
<divclass="section">
425
-
<h4>Use Cases</h4>
425
+
<h4>What's Happening?</h4>
426
426
<ul>
427
-
<li><strong>Async Login:</strong>User logs in after page load</li>
428
-
<li><strong>Delayed Consent:</strong>Consent given after initial load</li>
429
-
<li><strong>SPAs:</strong>Single Page Apps with dynamic login</li>
430
-
<li><strong>Lazy Loading:</strong>Load ${IDENTITY_NAME} only when needed</li>
427
+
<li><strong>Initial Load:</strong>Prebid initializes with <code>setConfig()</code> but no ${IDENTITY_NAME} module configured yet</li>
428
+
<li><strong>Deferred Config:</strong>When user provides email, <code>mergeConfig()</code> adds ${IDENTITY_NAME} without overwriting existing settings</li>
429
+
<li><strong>Token Generation:</strong><code>refreshUserIds()</code> triggers Prebid to generate the ${IDENTITY_NAME} token using CSTG credentials</li>
430
+
<li><strong>Local Storage:</strong>Prebid stores tokens in localStorage (${UID_STORAGE_KEY}) for persistence across page loads</li>
0 commit comments