appendSupplementalDataIDTo appendsupplementaldataidto
This helper method lets you append the Supplemental Data ID (SDID) as a query string parameter to a redirect URL. This is useful when using A4T and you need to persist the SDID from one page to another and stitch those separate visits together. To use this function, you must have implemented the ID service with the same Organization ID on the source and destination domains.
Contents:
Syntax and Code Sample section-cbb0b2f73bcc418386796c24c01b2365
Syntax: appendSupplementalDataIDTo( *
URL*, *
SDID*)
Code Sample
var visitor = Visitor.getInstance("Insert Experience Cloud organization ID here");
//Get current supplemental data id
var theCurrentSDID = visitor._supplementalDataIDCurrent ? visitor._supplementalDataIDCurrent : "";
//Call helper method to append SDID to the Page B URL from Page A
var pageB = "www.domain.com/pageB";
var pageBWithSdid = visitor.appendSupplementalDataIDTo(pageB, theCurrentSDID));
Sample Output section-dbe02d7ff6bd4ad1a2a26bf9cff54fa4
As shown below, the URL redirect contains the visitor’s SDID, your Organization ID, and a UNIX timestamp in the call to the receiving page.
- www.domain.com/pageB?adobe_mc_sdid=SDID=7996F0B028999505-13DA591039D6226|MCORGID=123456789@AdobeOrg|TS=1498569322
Changing the SDID Timeout with sdidParamExpiry section-99946715cefa4acc95200b093db5297e
The sdidParamExpiry configuration lets you change the default SDID expiration interval when passing that ID from one page to another using the appendSupplementalDataIDTo
helper function. By default, the ID service code on the receiving page has 30 seconds to get the SDID from the URL sent by the referring page. If the ID service code on the receiving page can’t retrieve the SDID in less than 30 seconds it requests a new SDID. This functionality is mainly for A4T customers who need to pass the SDID from one page to another and want control over this timeout interval.
If you need to change the default SDID timeout, add sdidParamExpiry
to the Visitor.getInstance
function with the following syntax:
Syntax: sdidParamExpiry: *
time in seconds*
Code Sample
When configured your ID service code could look similar to this sample. This sample sets the SDID timeout to 15 seconds.
var visitor = Visitor.getInstance ("Insert Experience Cloud organization ID here",{
...
//Change the default SDID timeout to 15 seconds
sdidParamExpiry: 15
});
//Get current supplemental data id
var theCurrentSDID = visitor._supplementalDataIDCurrent ? visitor._supplementalDataIDCurrent : "";
//Call helper method to append SDID to the Page B URL from Page A
var pageB = "www.domain.com/pageB";
var pageBWithSdid = visitor.appendSupplementalDataIDTo(pageB, theCurrentSDID));