Skip to content

Commit

Permalink
Add Server Guided ad technology
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen-Veltmans committed Nov 14, 2024
1 parent 1a2d866 commit b5594a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conviva/src/integration/ads/AdReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
calculateCurrentAdBreakInfo,
collectAdMetadata,
collectPlayerInfo,
isServerGuidedAd,
updateAdMetadataForGoogleIma
} from '../../utils/Utils';

Expand Down Expand Up @@ -67,7 +68,7 @@ export class AdReporter {
this.contentInfo()[Constants.ASSET_NAME] ?? this.player.source?.metadata?.title ?? 'NA';

// [Required] The ad technology as CLIENT_SIDE/SERVER_SIDE
adMetadata['c3.ad.technology'] = calculateAdType(currentAd);
adMetadata['c3.ad.technology'] = isServerGuidedAd(currentAd) ? 'Server Guided' : calculateAdType(currentAd);

this.convivaAdAnalytics.setAdInfo(adMetadata);
this.convivaAdAnalytics.reportAdLoaded(adMetadata);
Expand Down
4 changes: 4 additions & 0 deletions conviva/src/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export function collectDeviceMetadata(): ConvivaDeviceMetadata {
};
}

export function isServerGuidedAd(adOrBreak: Ad | AdBreak) {
return adOrBreak.integration === 'theoads';
}

export function calculateAdType(adOrBreak: Ad | AdBreak) {
switch (adOrBreak.integration) {
case 'theoads': {
Expand Down

0 comments on commit b5594a3

Please sign in to comment.