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
Copy file name to clipboardExpand all lines: docs/sdks/sdk-ref-javascript.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,11 +355,11 @@ The `init()` function can throw the following errors.
355
355
356
356
#### Legacy Callback Function
357
357
358
-
This is provided only for backward compatibility between version 3 and earlier versions: new integrations should use the new-style [callback function](#callback-function). Note that the callback parameters are not compatible in either direction: legacy callbacks cannot be registered using the [Array Push Pattern](#array-push-pattern), and new-style callbacks cannot be provided to `init`.
358
+
This is provided only for backward compatibility between version 3 or 4 and earlier versions: new integrations should use the new-style [callback function](#callback-function). Note that the callback parameters are not compatible in either direction: legacy callbacks cannot be registered using the [Array Push Pattern](#array-push-pattern), and new-style callbacks cannot be provided to `init`.
359
359
360
360
For details, see [Legacy Callback Function](./sdk-ref-javascript-v2#callback-function) in the documentation for earlier versions of this SDK.
361
361
362
-
If you have already built an integration using a legacy callback function, you can use it with the current version of the SDK with no changes. However, this functionality will be removed in a future version of the SDK. We strongly recommend that you update your integration to use the new-style [callback function](#callback-function).
362
+
If you have already built an integration using a legacy callback function, you can use it with the current version of the SDK with no changes. However, this functionality will be removed in a future version of the SDK. We strongly recommend that you update your integration to use the newer [callback function](#callback-function) introduced in version 3.
363
363
364
364
### getAdvertisingToken(): string
365
365
@@ -592,6 +592,9 @@ If you're migrating from a version earlier than v3, or if you previously migrate
592
592
-[Take advantage of `setIdentity` and other new features](#take-advantage-of-setidentity-and-other-new-features)
593
593
-[Change how you call init](#change-how-you-call-init)
594
594
595
+
596
+
[**FOR THE CALLBACK SAY MIGRATE TO NEWER CLALBACK SYSTEM INTRODUCED IN V3 OR SOMETHING. GWH**]
597
+
595
598
##### Migrate to the Version 3 Callback System
596
599
597
600
In earlier versions, the callback accepts a single object as a parameter, with properties `advertisingToken`, `status`, and `statusText`. For version 3, change this function to use the new [Callback Function Signature](#callback-function-signature).
##### Take advantage of `setIdentity` and other new features
616
619
620
+
**gwh STILL RECOMMENDED NOT REQUIRED**
621
+
617
622
Versions of the SDK prior to version 3 had only one way to provide a new identity: in the call to `init`. This meant that some publishers had to make use of various workarounds to provide a new identity later in the page lifecycle. You might be able to simplify your integration by removing these workarounds and just calling `setIdentity` if you want to pass a new identity to the SDK after `init` has been called.
0 commit comments