ActivityMap.regionIDAttribute
ActivityMap.regionIDAttribute変数を使用すると、Activity Map Region ディメンションを決定する際にActivity Mapが検索する属性を変更できます。 サイトがid属性をActivity Map リージョンに対して使いにくくする構造になっている場合は、この変数を設定して別の属性を見ることができます。
Web SDK拡張機能のRegion ID属性
クリックデータ収集を有効にするが有効になっている場合、フィルタークリックプロパティ コールバックコードブロックを使用します。 このコードブロック内で、content.clickedElementの値を確認し、値を変更するか、リンクトラッキングデータの収集を放棄します。
Web SDK JavaScript ライブラリのリージョン ID属性
clickCollectionEnabledが有効になっている場合、clickCollection オブジェクトでfilterClickDetails コールバックを使用します。 このコールバック内で、clickedElementの値を確認し、収集した領域のロジックをカスタマイズできます。
alloy("configure", {
clickCollectionEnabled: true,
clickCollection: {
filterClickDetails: function(content) {
// If the clicked element was in a table, set the region to the contents of the data-custom attribute
// If the clicked element was not in a table, or if the data-custom attribute doesn't exist, leave region as-is
content.region = content.clickedElement.closest('table')?.getAttribute('data-custom') || content.region;
}
}
});
Adobe Analytics拡張機能を使用したRegion ID属性
Adobe Analytics 拡張機能には、この変数を使用する専用のフィールドはありません。 AppMeasurement 構文に従って、カスタムコードエディターを使用します。
AppMeasurementを使用したs.ActivityMap.regionIDAttribute
s.ActivityMap.regionIDAttribute変数は、Activity Map Region ディメンションを決定する属性を表す文字列です。 この変数は、デフォルトでidに設定されています。 この変数を変更すると、Activity Mapはid属性を検索しなくなり、リージョンを判断する他の条件(セマンティック要素など)を検索します。
<script>
var s = s_gi("examplersid");
s.ActivityMap.regionIDAttribute = "data-custom";
</script>
<!-- Clicking any of these links populates the region dimension with 'left-nav' -->
<div id="676967617A656C6C65" data-custom="left-nav">
<a href="index.html">Home</a>
<a href="products.html">View our products</a>
<a href="contact.html">Contact us</a>
</div>
recommendation-more-help
analytics-help-implement