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
<h1>React Client-Side {IDENTITY_NAME} Integration Example using JavaScript SDK</h1>
109
+
<p>
110
+
This example demonstrates how a content publisher can integrate {IDENTITY_NAME} using client-side token generation with React, where the SDK generates tokens directly in the browser using public credentials. For documentation, see the{' '}
Indicates whether a valid {IDENTITY_NAME} token is present and can be used for personalized ad targeting.
127
+
</div>
128
+
</div>
129
+
</div>
130
+
</td>
131
+
<tdclassName="value">
132
+
<pre>{targetedAdvertisingReady}</pre>
133
+
</td>
134
+
</tr>
135
+
<tr>
136
+
<tdclassName="label">
137
+
<divclassName="tooltip-wrapper">
138
+
Advertising Token:
139
+
<divclassName="tooltip">
140
+
<spanclassName="tooltip-trigger">?</span>
141
+
<divclassName="tooltip-content">
142
+
The encrypted {IDENTITY_NAME} token that is passed to ad systems without exposing raw user identity. It is automatically refreshed by the SDK in the background when expired.
143
+
</div>
144
+
</div>
145
+
</div>
146
+
</td>
147
+
<tdclassName="value">
148
+
<pre>{advertisingToken}</pre>
149
+
</td>
150
+
</tr>
151
+
<tr>
152
+
<tdclassName="label">
153
+
<divclassName="tooltip-wrapper">
154
+
Is Login Required?
155
+
<divclassName="tooltip">
156
+
<spanclassName="tooltip-trigger">?</span>
157
+
<divclassName="tooltip-content">
158
+
Indicates whether a new {IDENTITY_NAME} token needs to be generated. Returns "yes" when no valid identity exists or the current identity has expired.
159
+
</div>
160
+
</div>
161
+
</div>
162
+
</td>
163
+
<tdclassName="value">
164
+
<pre>{loginRequired}</pre>
165
+
</td>
166
+
</tr>
167
+
<tr>
168
+
<tdclassName="label">
169
+
<divclassName="tooltip-wrapper">
170
+
Has opted out?
171
+
<divclassName="tooltip">
172
+
<spanclassName="tooltip-trigger">?</span>
173
+
<divclassName="tooltip-content">
174
+
Shows whether the user has exercised opt-out, in which case no advertising token may be generated or used.
175
+
</div>
176
+
</div>
177
+
</div>
178
+
</td>
179
+
<tdclassName="value">
180
+
<pre>{hasOptedOut}</pre>
181
+
</td>
182
+
</tr>
183
+
<tr>
184
+
<tdclassName="label">
185
+
<divclassName="tooltip-wrapper">
186
+
Identity Callback State:
187
+
<divclassName="tooltip">
188
+
<spanclassName="tooltip-trigger">?</span>
189
+
<divclassName="tooltip-content">
190
+
The complete identity object returned by the SDK. Contains the full {IDENTITY_NAME} identity data including refresh tokens and metadata.
<li><strong>Client-Side Token Generation:</strong> The SDK generates tokens directly in the browser using your public credentials</li>
270
+
<li><strong>Auto-Refresh:</strong> Tokens are automatically refreshed by the SDK in the background when expired</li>
271
+
<li><strong>Local Storage:</strong> The SDK stores identity in localStorage (__uid2_advertising_token or __euid_advertising_token) for persistence across page loads</li>
272
+
</ul>
191
273
</div>
192
-
)}
274
+
275
+
<divclassName="note">
276
+
<strong>Note:</strong> This is a test-only environment. Do not use real user data.
0 commit comments