Dynamic accounts are only supported using legacy JavaScript implementations (H Code). These variables are not supported in current AppMeasurement libraries or Adobe Experience Platform Data Collection.
The s.dynamicAccountList
variable dynamically determines the value of s_account
. If dynamicAccountSelection
is set to true
, the dynamicAccountMatch
variable is compared with dynamicAccountList
. If a match is found, the matching report suite ID is used.
This variable is a string that is automatically parsed by the JavaScript file.
s.dynamicAccountList = "[rsid]=[valuetomatch],[rsid2]=[valuetomatch]";
Valid input is a semicolon-separated list of rsid and value pairs. Each list contains the following items:
Only standard ASCII characters should be used in the string. Do not include spaces.
For all the following examples, the page URL is https://example.com/path2/?prod_id=12345
, the dynamicAccountSelection
variable is set to true
, and the s_account
variable is set to examplersid
.
// In this example, the report suite that receives data is examplersid1.
s.dynamicAccountMatch = "window.location.hostname";
s.dynamicAccountList = "examplersid2=www2.example.com;examplersid1=example.com";
// In this example, the report suite that receives data is examplersid2.
s.dynamicAccountMatch = "window.location.pathname";
s.dynamicAccountList = "examplersid2=path2;examplersid3=path3";
// In this example, no rules match so it resorts to the default rsid in s_account, examplersid.
s.dynamicAccountMatch = "window.location.pathname";
s.dynamicAccountList = "examplersid4=path4;examplersid5=path5";
dynamicAccountMatch
variable matches more than one rule, the left-most rule is used to determine the report suite. As a result, place more generic rules to the right of the list.s_account
is used.dynamicAccountSelection
rules apply only to the section of the URL specified in dynamicAccountMatch
.