From ac9a32f81bfb06693076c163da48ea978e0cdf72 Mon Sep 17 00:00:00 2001 From: Kun Wu Date: Fri, 15 Nov 2024 14:25:31 +0100 Subject: [PATCH 1/2] feat: remove the index from ad id for easier identification --- utils/vast-maker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/vast-maker.js b/utils/vast-maker.js index 6792427..c4726b6 100644 --- a/utils/vast-maker.js +++ b/utils/vast-maker.js @@ -196,15 +196,15 @@ function AttachPodAds(vast, podAds, params) { .attachCreatives() .attachCreative({ id: `CRETIVE-ID_00${i + 1}`, - [adId]: `${podAds[i].id}_${i + 1}`, + [adId]: `${podAds[i].id}`, sequence: `${i + 1}`, }); if (vast.attrs.version === "4.0") { mediaNode = mediaNode .addUniversalAdId( - encodeURIComponent(`${podAds[i].universalId}${i + 1}`), { + encodeURIComponent(`${podAds[i].universalId}`), { idRegistry: "test-ad-id.eyevinn", - idValue: encodeURIComponent(`${podAds[i].universalId}${i + 1}`), + idValue: encodeURIComponent(`${podAds[i].universalId}`), } ); } From b9f835c24804bc33c005dd035b158841f1da217e Mon Sep 17 00:00:00 2001 From: Kun Wu Date: Fri, 15 Nov 2024 16:14:06 +0100 Subject: [PATCH 2/2] feat: keep index in the universal id --- utils/vast-maker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/vast-maker.js b/utils/vast-maker.js index c4726b6..11ea239 100644 --- a/utils/vast-maker.js +++ b/utils/vast-maker.js @@ -202,9 +202,9 @@ function AttachPodAds(vast, podAds, params) { if (vast.attrs.version === "4.0") { mediaNode = mediaNode .addUniversalAdId( - encodeURIComponent(`${podAds[i].universalId}`), { + encodeURIComponent(`${podAds[i].universalId}${i + 1}`), { idRegistry: "test-ad-id.eyevinn", - idValue: encodeURIComponent(`${podAds[i].universalId}`), + idValue: encodeURIComponent(`${podAds[i].universalId}${i + 1}`), } ); }