ID Synchronization by URL or Data Source
Last update: June 10, 2021
- Topics:
- Identities
- Integrations
CREATED FOR:
- Developer
- User
- Admin
- Leader
The ID service functions idSyncByURL and idSyncByDataSource let you manually implement an ID sync in the Destination Publishing iFrame. These are available in VisitorAPI.js versions 1.10, or higher.
Syntax, Properties, and Macros
Syntax
Code | Synchronizes User IDs |
---|---|
visitor.idSyncByURL(); | Between different data partners and Audience Manager by using a custom ID sync URL. |
visitor.idSyncByDataSource(); | When you already know the DPID and DPUUID and want to send it to Audience Manager in the standard ID sync URL format. |
Properties
The following table lists and defines the properties available to both functions.
Name | Type | Description |
---|---|---|
dpid | String | Data provider ID assigned by Audience Manager. |
dpuuid | String | The data provider's unique ID for the user. |
minutesToLive | Number | (Optional) Sets the cookie expiration time. Must be an integer. Default is 20160 minutes (14 days). |
url | String | Destination URL. |
Macros
Both functions accept the following macros:
%TIMESTAMP%
: Generates a timestamp (in milliseconds). Used for cache busting.%DID%
: Inserts the Audience Manager ID for the user.%HTTP_PROTO%
: Sets the communication protocol (http
orhttps
).
Sample Code and Output
Both functions return Successfully queued
if successful. They return an error message string if not.
visitor.idSyncByURL
Sample Code
//Instatiate Visitor
var visitor = Visitor.getInstance
("MARKETING-CLOUD-ORG-ID-HERE",{});
// Fires url with macros replaced
visitor.idSyncByURL({
dpid: '24', // must be a string
url: '//su.addthis.com/red/usync?pid=16&puid=%DID%&url=%HTTP_PROTO%://
dpm.demdex.net/ibs:dpid=420&dpuuid={{uid}}',
minutesToLive: 20160 // optional, defaults to 20160 minutes (14 days) });
Sample Output
http://su.addthis.com/red/usync?pid=16&puid=28777806459181003670799219185178493848&url=http%3A%2F%2Fdpm.demdex.net%2Fibs%3Adpid%3D420%26dpuuid%3D%7B%7Buid%7D%7D
visitor.idSyncByDataSource
Sample Code
//Instantiate Visitor
var visitor = Visitor.getInstance
("MARKETING-CLOUD-ORG-ID-HERE",{});
// Fires 'http:/https:' + '//dpm.demdex.net/ibs:dpid=&dpuuid='
visitor.idSyncByDataSource({
dpid: '24', // must be a string
dp minutesToLive: 20160 // optional, defaults to 20160 minutes (14 days) });
Sample Output
http://dpm.demdex.net/ibs:dpid=24&dpuuid=98765
Related Articles
Experience Cloud Services
- Identity Service Help
- Overview
- Implementation
- Implementation methods
- Implementation guides
- Implement with Experience Platform tags
- Implement for Analytics
- Implement for Target
- Implement for Analytics and Audience Manager
- Implement for Analytics, Audience Manager, and Target
- Using the ID Service with A4T and a Server-side Implementation of Target
- Direct Integration with the ID Service
- Direct Integration Use Cases
- Test and verify the ID Service
- Opt-in Service
- ID Service API
- ID Service API Overview
- Configuration
- Configurations overview
- audienceManagerServer and audienceManagerServerSecure
- cookieDomain
- cookieLifetime
- disableIdSyncs
- disableThirdPartyCalls
- disableThirdPartyCookies
- idSyncAttachIframeOnWindowLoad
- idSyncContainerID
- idSyncSSLUseAkamai
- loadTimeout
- overwriteCrossDomainMCIDAndAID
- resetBeforeVersion
- sdidParamExpiry
- Secure and SameSite configurations
- secureCookie
- useCORSOnly
- whitelistParentDomain and whitelistIframeDomains
- Methods
- Methods
- appendSupplementalDataIDTo
- appendVisitorIDsTo (Cross-Domain Tracking)
- callTimeOut Methods
- ID Synchronization by URL or Data Source
- getInstance
- getAnalyticsVisitorID
- getCustomerIDs
- setCustomerIDs
- getMarketingCloudVisitorID
- getLocationHint
- getVisitorValues
- isClientSideMarketingCloudVisitorID
- resetState
- Reference
- Reference Overview
- Analytics Reference
- Analytics Reference Overview
- CNAME Implementation Overview
- Setting Analytics and Experience Cloud IDs
- Order of Operations for Analytics IDs
- ID Service Migration Decision Points
- ID Service Migration Scenarios
- Analytics and Identity Requests
- Server-side Implementation Mixed with JavaScript
- The ID Service Grace Period
- Google Chrome SameSite labelling changes
- Content Security Policies and the ID Service
- COPPA Support in the ID Service
- CORS Support in the ID Service
- Customer IDs and Authentication States
- ECID library methods in a Safari ITP world
- Identifying Unique Visitors
- Get Region and User IDs From the AMCV Cookie or the ID Service
- Requirements for the ID Service
- Video Heartbeat and the ID Service
- Data Workbench and the ID Service
- SHA256 Hashing Support for setCustomerIDs
- FAQs
- Release notes for ID Service
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more