From cf5d0f4240326d9db388dcd128a69a1045c165ed Mon Sep 17 00:00:00 2001 From: Wonne Joosen Date: Sat, 14 Sep 2024 23:14:17 +0200 Subject: [PATCH 1/4] add c4 to CZ DCR metadata types --- nielsen/src/nielsen/Types.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nielsen/src/nielsen/Types.ts b/nielsen/src/nielsen/Types.ts index 049fba98..4223e651 100644 --- a/nielsen/src/nielsen/Types.ts +++ b/nielsen/src/nielsen/Types.ts @@ -129,6 +129,12 @@ export type NielsenDCRContentMetadataCZ = NielsenDCRContentMetadata & { * [LIVE] Keep empty : "nol_c2":"p2," */ c2?: string; + /* + * The actual duration of the live broadcast + * [VOD] Keep empty + * [LIVE] Pass the duration of the live broadcast in seconds + */ + c4?: string; /* * CMS tag helper item. Indication of whether the content being played supports the insertion of advertisements. “0” – No ads “1” – Supports ads “2” – Don't know (default). */ @@ -162,6 +168,12 @@ export type DCRContentMetadataCZ = DCRContentMetadata & { * [LIVE] Keep empty : "nol_c2":"p2," */ nol_c2?: string; + /* + * The actual duration of the live broadcast + * [VOD] Keep empty + * [LIVE] Pass the value in seconds as follows "nol_c4" : "p4, value_in_seconds" + */ + nol_c4?: string; /* * CMS tag helper item. Indication of whether the content being played supports the insertion of advertisements. “0” – No ads “1” – Supports ads “2” – Don't know (default). */ From 023e3dca4c53b413bfd949f78831f8251c238249 Mon Sep 17 00:00:00 2001 From: Wonne Joosen Date: Sat, 14 Sep 2024 23:14:39 +0200 Subject: [PATCH 2/4] map c4 to the reported metadata --- nielsen/src/utils/Util.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nielsen/src/utils/Util.ts b/nielsen/src/utils/Util.ts index a0d5da2c..38d9c2f4 100644 --- a/nielsen/src/utils/Util.ts +++ b/nielsen/src/utils/Util.ts @@ -41,7 +41,7 @@ export function buildDCRContentMetadata( adloadtype: metadata.adloadtype }; if (country === NielsenCountry.CZ) { - const { crossId1, segB, segC, c1, c2, hasAds } = metadata as NielsenDCRContentMetadataCZ; + const { crossId1, segB, segC, c1, c2, c4, hasAds } = metadata as NielsenDCRContentMetadataCZ; const dcrContentMetadataCZ: DCRContentMetadataCZ = { ...dcrContentMetadata, ['crossId1']: crossId1, @@ -51,6 +51,7 @@ export function buildDCRContentMetadata( hasAds: hasAds }; if (c1) dcrContentMetadataCZ['nol_c1'] = `p1,${c1}`; + if (c4) dcrContentMetadataCZ['nol_c4'] = `p4,${c4}`; return dcrContentMetadataCZ; } if (country === NielsenCountry.US) { From f6d149af1f15d3468d4aae4832fb1e8b3acc6823 Mon Sep 17 00:00:00 2001 From: Wonne Joosen Date: Sat, 14 Sep 2024 23:19:32 +0200 Subject: [PATCH 3/4] add changeset --- .changeset/fresh-turkeys-hang.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fresh-turkeys-hang.md diff --git a/.changeset/fresh-turkeys-hang.md b/.changeset/fresh-turkeys-hang.md new file mode 100644 index 00000000..247a10f5 --- /dev/null +++ b/.changeset/fresh-turkeys-hang.md @@ -0,0 +1,5 @@ +--- +"@theoplayer/nielsen-connector-web": minor +--- + +Added an optional c4 parameter to `NielsenDCRContentMetadataCZ`. From 0709fc6680260aff073a645756a5b12ca8b42fd9 Mon Sep 17 00:00:00 2001 From: Wonne Joosen Date: Mon, 16 Sep 2024 09:32:26 +0200 Subject: [PATCH 4/4] pass c1 and c4 tags with empty values instead of no tags --- nielsen/src/utils/Util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nielsen/src/utils/Util.ts b/nielsen/src/utils/Util.ts index 38d9c2f4..f2c3b3a4 100644 --- a/nielsen/src/utils/Util.ts +++ b/nielsen/src/utils/Util.ts @@ -45,13 +45,13 @@ export function buildDCRContentMetadata( const dcrContentMetadataCZ: DCRContentMetadataCZ = { ...dcrContentMetadata, ['crossId1']: crossId1, + ['nol_c1']: `p1,${c1 ?? ''}`, ['nol_c2']: `p2,${c2 ?? ''}`, + ['nol_c4']: `p4,${c4 ?? ''}`, segB: segB, segC: segC ?? '', hasAds: hasAds }; - if (c1) dcrContentMetadataCZ['nol_c1'] = `p1,${c1}`; - if (c4) dcrContentMetadataCZ['nol_c4'] = `p4,${c4}`; return dcrContentMetadataCZ; } if (country === NielsenCountry.US) {