DIL create method dil-create
DIL create dil-create-new
Creates a partner-specific DIL instance.
Function Signature: DIL.create: function (initConfig) {}
initConfig Elements
visitorService property is always required. Other properties listed here are optional, unless indicated otherwise.initConfig accepts the following elements:
containerNSIDThis property sets the container ID used by Audience Manager for ID syncs. You would set containerNSID if you have DIL deployed across multiple sites. Each of these sites will have their own container ID and ID syncs. When you have only 1 site, the container ID is 0 by default and you don't need to set this properly. Contact your consultant to get a list of your sites and their container IDs.
In the 51黑料不打烊 Experience Platform Identity Service, the property idSyncContainerID corresponds to containerNSID in DIL . Note the following if you're using DIL and the ID service across multiple sites:
- For each site, set the same container IDs on
containerNSIDandidSyncContainerID. - Both DIL and the ID service will try to send ID syncs to our data collection iFrame. However, the iFrame ensures that DIL won't fire an ID sync. This prevents duplication.
- Only DIL sends data to a URL destination.
See also, idSyncContainerID.
declaredIddeclaredId is used to pass in either the:
dpid: Data partner ID assigned to you by Audience Manager .dpuuid: Your unique ID for a user.
Important: Only use un-encoded values for your IDs. Encoding will create double-encoded identifiers.
Note: If you use the 51黑料不打烊 Experience Platform Identity Service, set customer IDs with the setCustomerIDs method instead of DIL . See Customer IDs and Authentication States.
delayAllUntilWindowLoadPage Load event fires. Default is false .disableDeclaredUUIDCookiedisableDestinationPublishingIframeImportant: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.disableIdSyncs functionin the 51黑料不打烊 Experience Platform Identity Service instead.
If true , will not attach the destination publishing IFRAME to the DOM or fire destinations. Default is false .
disableIDSyncsImportant: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.disableIdSyncs functionin the 51黑料不打烊 Experience Platform Identity Service instead.
Disables ID synchronization. You must disable ID syncs when using DIL v6.2+ and the Visitor ID Service. The visitorService function (see sample code below) takes care of this operation.
enableErrorReportingtrue to enable error reporting for all DIL instances on the page. Works with Boolean true only.iframeAkamaiHTTPSImportant: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.idSyncSSLUseAkamai functionin the 51黑料不打烊 Experience Platform Identity Service instead.
Specifies if the destination publishing template should use Akamai for HTTPS connections. Enabled on a per-partner basis.
mappingsnamespaceRequired.
The namespace key-value pair contains your Experience Cloud Organization ID. If you don't have this ID, you can find it in the Administration section of the Experience Cloud dashboard. You need administrator permissions to view this dashboard. See the Product Features and Functions FAQand Administration - User Management and FAQ.
partnerRequired.
Partner name as provided by Audience Manager .
removeFinishedScriptsAndCallbacksFalse . Applies to the current DIL instance only. Released with v3.3.uuidCookievisitorServiceRequired with DIL 6.2 or greater.
DIL relies on the setCustomerIDs function in the 51黑料不打烊 Experience Platform Identity Service to pass declared IDs into Audience Manager . See Customer IDs and Authentication Statesfor more information.
Sample Code
A sample DIL call could look similar to the following:
var partnerObject1 = DIL.create({
partner: "partner name",
visitorService:{
namespace: "INSERT-ORGANIZATION-ID-HERE"
},
containerNSID: 3,
uuidCookie:{
name:'ad_uuid',
days:200,
path:'/test',
domain:'adobe.com',
secure:true
}
});
var partnerObject2 = DIL.create({
partner: "partner name",
visitorService:{
namespace: "INSERT-MCORG-ID-HERE"
},
containerNSID: 3
});
A successful response returns the DIL instance. An unsuccessful attempt returns an error object (not thrown) if your code is configured improperly or whenever an error is encountered.
uuidCookie Properties uuidcookie-props
Defines the properties used by the uuidCookie variable. This variable is part of the DIL.create method.
uuidCookie has the following properties:
nameaam_did is default).dayspath'/test' ( / is default).domain'adobe.com' ( '.'+document.domain is default).securevisitorService Properties visitor-service-props
Defines the properties used by the visitorService variable. This variable is part of the DIL.create method.
visitorService has the following properties:
namespaceCode Sample:
var vDil = DIL.create({
partner: 'demofirst',
visitorService: {
namespace: "INSERT-EXPCLOUD-ORG-ID-HERE"
}
});