From 2b07119b7e3e11b87239427cff84025e6cc2fa3a Mon Sep 17 00:00:00 2001 From: Minjiicho Date: Sun, 3 Sep 2023 19:24:29 +0900 Subject: [PATCH] ENHANCE: expand widgetOpts/logOpts --- ads/vendors/dable.js | 10 +++++++++- ads/vendors/dable.md | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ads/vendors/dable.js b/ads/vendors/dable.js index fe6bf423e0ac..61481828594a 100644 --- a/ads/vendors/dable.js +++ b/ads/vendors/dable.js @@ -17,7 +17,10 @@ export function dable(global, data) { 'setService', data['serviceName'] || global.window.context.location.hostname ); - global.dable('setURL', global.window.context.sourceUrl); + global.dable( + 'setURL', + global.window.context.canonicalUrl || global.window.context.sourceUrl + ); global.dable('setRef', global.window.context.referrer); const slot = global.document.createElement('div'); @@ -34,6 +37,7 @@ export function dable(global, data) { const articleSection = data['articleSection'] || ''; const articleSection2 = data['articleSection2'] || ''; const articleSection3 = data['articleSection3'] || ''; + const orgServiceId = data['orgServiceId'] || ''; const widgetOpts = {}; const logOpts = {}; @@ -52,6 +56,10 @@ export function dable(global, data) { widgetOpts.category3 = articleSection3; logOpts.category3 = articleSection3; } + if (orgServiceId) { + widgetOpts.orgServiceId = orgServiceId; + logOpts.orgServiceId = orgServiceId; + } if (itemId) { logOpts.id = itemId; diff --git a/ads/vendors/dable.md b/ads/vendors/dable.md index e90eb8bfc223..228a769ffa00 100644 --- a/ads/vendors/dable.md +++ b/ads/vendors/dable.md @@ -10,9 +10,11 @@ height="200" type="dable" data-widget-id="jobgqR7W" + data-service-name="testservice" data-item-id="testitem" data-article-section="politics" data-article-section2="global" + data-org-service-id="1" > ``` @@ -24,12 +26,13 @@ For configuration details and to generate your tags, please contact https://admi ### Required parameters - `data-widget-id` +- `data-service-name` ### Optional parameters - `data-item-id` -- `data-service-name` - `data-channel` - `data-article-section` - `data-article-section2` - `data-article-section3` +- `data-org-service-id` \ No newline at end of file