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:
containerNSID
This 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 ÃÛ¶¹ÊÓƵ 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
containerNSID
andidSyncContainerID
. - 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.
declaredId
declaredId
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 ÃÛ¶¹ÊÓƵ Experience Platform Identity Service, set customer IDs with the setCustomerIDs
method instead of DIL . See Customer IDs and Authentication States.
delayAllUntilWindowLoad
Page Load
event fires. Default is false
.disableDeclaredUUIDCookie
disableDestinationPublishingIframe
Important: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.disableIdSyncs
functionin the ÃÛ¶¹ÊÓƵ Experience Platform Identity Service instead.
If true
, will not attach the destination publishing IFRAME to the DOM or fire destinations. Default is false
.
disableIDSyncs
Important: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.disableIdSyncs
functionin the ÃÛ¶¹ÊÓƵ 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.
enableErrorReporting
true
to enable error reporting for all DIL instances on the page. Works with Boolean true
only.iframeAkamaiHTTPS
Important: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.idSyncSSLUseAkamai
functionin the ÃÛ¶¹ÊÓƵ Experience Platform Identity Service instead.
Specifies if the destination publishing template should use Akamai for HTTPS connections. Enabled on a per-partner basis.
mappings
namespace
Required.
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.
partner
Required.
Partner name as provided by Audience Manager .
removeFinishedScriptsAndCallbacks
False
. Applies to the current DIL instance only. Released with v3.3.uuidCookie
visitorService
Required with DIL 6.2 or greater.
DIL relies on the setCustomerIDs
function in the ÃÛ¶¹ÊÓƵ 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:
name
aam_did
is default).days
path
'/test'
( /
is default).domain
'adobe.com'
( '.'+document.domain
is default).secure
visitorService 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:
namespace
Code Sample:
var vDil = DIL.create({
partner: 'demofirst',
visitorService: {
namespace: "INSERT-EXPCLOUD-ORG-ID-HERE"
}
});