動的アカウントは、レガシー JavaScript 実装(H コード)を使用した場合にのみサポートされます。これらの変数は、現在の AppMeasurement ライブラリや Adobe Experience Platform Launch ではサポートされていません。
s.dynamicAccountList
変数は、s_account
の値を動的に決定します。dynamicAccountSelection
を true
に設定すると、dynamicAccountMatch
変数が dynamicAccountList
と比較されます 。一致が見つかった場合は、一致するレポートスイート ID が使用されます。
この変数は、JavaScript ファイルによって自動的に解析される文字列です。
s.dynamicAccountList = "[rsid]=[valuetomatch],[rsid2]=[valuetomatch]";
有効な入力は、rsid と値のペアをセミコロンで区切ったリストです。各リストには、次の項目が含まれます。
文字列内では標準的な ASCII 文字のみを使用してください。スペースは含めないでください。
次の例では、ページ URL はhttps://example.com/path2/?prod_id=12345
で、dynamicAccountSelection
変数は true
に設定され、s_account
変数は 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
変数が複数のルールと一致する場合、最も左にあるルールを使用してレポートスイートが決定されます。そのため、より一般的なルールをリストの右側に移動する必要があります。s_account
のデフォルトレポートスイートが使用されます。dynamicAccountSelection
ルールは、dynamicAccountMatch
で指定された URL のセクションにのみ適用されます。