@denimlabs/fb-position-validation
Advanced tools
Comparing version 1.0.19 to 1.0.20
@@ -63,2 +63,20 @@ "use strict"; | ||
}; | ||
var TrafficPublisherPlatforms = ['facebook', 'instagram', 'audience_network', 'messenger']; | ||
var TrafficPlacments = { | ||
publisher_platforms: VALID_PUBLISHER_PLATFORMS, | ||
device_platforms: VALID_DEVICE_PLATFORMS, | ||
facebook_positions: VALID_FACEBOOK_POSITIONS, | ||
instagram_positions: VALID_INSTAGRAM_POSTIONS, | ||
audience_network_positions: ['classic', 'reward_video'], | ||
messenger_positions: VALID_MESSENGER_POSITIONS | ||
}; | ||
var ReachPublisherPlatforms = ['facebook', 'instagram', 'audience_network', 'messenger']; | ||
var ReachPlacments = { | ||
device_platforms: VALID_DEVICE_PLATFORMS, | ||
publisher_platforms: ['facebook', 'instagram', 'audience_network', 'messenger'], | ||
facebook_positions: ['feed', 'instant_article', 'video_feeds', 'marketplace', 'story', 'instream_video'], | ||
instagram_positions: ['story', 'stream'], | ||
audience_network_positions: ['classic', 'instream_video'], | ||
messenger_positions: ['story'] | ||
}; | ||
var ConversionPublisherPlatforms = ['facebook', 'instagram', 'audience_network', 'messenger']; | ||
@@ -70,4 +88,4 @@ var ConversionPlacments = { | ||
instagram_positions: VALID_INSTAGRAM_POSTIONS, | ||
audience_network_positions: VALID_AUDIENCE_NETWORK_POSITIONS, | ||
messenger_positions: VALID_MESSENGER_POSITIONS | ||
audience_network_positions: ['classic', 'reward_video'], | ||
messenger_positions: ['messenger_home', 'story'] | ||
}; | ||
@@ -80,3 +98,7 @@ | ||
return EngagementPlacments; | ||
} else if (objective === 'Conversion' || objective === 'LINK_CLICKS') { | ||
} else if (objective === 'Traffic' || objective === 'LINK_CLICKS') { | ||
return TrafficPlacments; | ||
} else if (objective === 'Reach' || objective === 'REACH') { | ||
return ReachPlacments; | ||
} else if (objective === 'Conversion' || objective === 'CONVERSIONS') { | ||
return ConversionPlacments; | ||
@@ -95,4 +117,8 @@ } | ||
return AllDevicePlatforms; | ||
} else if (objective === 'Conversion' || objective === 'LINK_CLICKS') { | ||
} else if (objective === 'Traffic' || objective === 'LINK_CLICKS') { | ||
return AllDevicePlatforms; | ||
} else if (objective === 'Reach' || objective === 'REACH') { | ||
return AllDevicePlatforms; | ||
} else if (objective === 'Conversion' || objective === 'CONVERSIONS') { | ||
return AllDevicePlatforms; | ||
} | ||
@@ -108,3 +134,7 @@ | ||
return EngagementPublisherPlatforms; | ||
} else if (objective === 'Conversion' || objective === 'LINK_CLICKS') { | ||
} else if (objective === 'Traffic' || objective === 'LINK_CLICKS') { | ||
return TrafficPublisherPlatforms; | ||
} else if (objective === 'Reach' || objective === 'REACH') { | ||
return ReachPublisherPlatforms; | ||
} else if (objective === 'Conversion' || objective === 'CONVERSIONS') { | ||
return ConversionPublisherPlatforms; | ||
@@ -111,0 +141,0 @@ } |
68
index.js
@@ -150,3 +150,47 @@ // Optional | ||
// LINK_CLICKS | ||
// LINK_CLICKS (TRAFFIC) | ||
const TrafficPublisherPlatforms = [ | ||
'facebook', | ||
'instagram', | ||
'audience_network', | ||
'messenger' | ||
] | ||
const TrafficPlacments = { | ||
publisher_platforms: VALID_PUBLISHER_PLATFORMS, | ||
device_platforms: VALID_DEVICE_PLATFORMS, | ||
facebook_positions: VALID_FACEBOOK_POSITIONS, | ||
instagram_positions: VALID_INSTAGRAM_POSTIONS, | ||
audience_network_positions: ['classic', 'reward_video'], | ||
messenger_positions: VALID_MESSENGER_POSITIONS | ||
} | ||
// REACH | ||
const ReachPublisherPlatforms = [ | ||
'facebook', | ||
'instagram', | ||
'audience_network', | ||
'messenger' | ||
] | ||
const ReachPlacments = { | ||
device_platforms: VALID_DEVICE_PLATFORMS, | ||
publisher_platforms: [ | ||
'facebook', | ||
'instagram', | ||
'audience_network', | ||
'messenger' | ||
], | ||
facebook_positions: [ | ||
'feed', | ||
'instant_article', | ||
'video_feeds', | ||
'marketplace', | ||
'story', | ||
'instream_video' | ||
], | ||
instagram_positions: ['story', 'stream'], | ||
audience_network_positions: ['classic', 'instream_video'], | ||
messenger_positions: ['story'] | ||
} | ||
// CONVERSIONS | ||
const ConversionPublisherPlatforms = [ | ||
@@ -163,4 +207,4 @@ 'facebook', | ||
instagram_positions: VALID_INSTAGRAM_POSTIONS, | ||
audience_network_positions: VALID_AUDIENCE_NETWORK_POSITIONS, | ||
messenger_positions: VALID_MESSENGER_POSITIONS | ||
audience_network_positions: ['classic', 'reward_video'], | ||
messenger_positions: ['messenger_home', 'story'] | ||
} | ||
@@ -173,3 +217,7 @@ | ||
return EngagementPlacments | ||
} else if (objective === 'Conversion' || objective === 'LINK_CLICKS') { | ||
} else if (objective === 'Traffic' || objective === 'LINK_CLICKS') { | ||
return TrafficPlacments | ||
} else if (objective === 'Reach' || objective === 'REACH') { | ||
return ReachPlacments | ||
} else if (objective === 'Conversion' || objective === 'CONVERSIONS') { | ||
return ConversionPlacments | ||
@@ -187,4 +235,8 @@ } | ||
return AllDevicePlatforms | ||
} else if (objective === 'Conversion' || objective === 'LINK_CLICKS') { | ||
} else if (objective === 'Traffic' || objective === 'LINK_CLICKS') { | ||
return AllDevicePlatforms | ||
} else if (objective === 'Reach' || objective === 'REACH') { | ||
return AllDevicePlatforms | ||
} else if (objective === 'Conversion' || objective === 'CONVERSIONS') { | ||
return AllDevicePlatforms | ||
} | ||
@@ -199,3 +251,7 @@ throw ERRORS.UNSUPPORTED_OBJECT | ||
return EngagementPublisherPlatforms | ||
} else if (objective === 'Conversion' || objective === 'LINK_CLICKS') { | ||
} else if (objective === 'Traffic' || objective === 'LINK_CLICKS') { | ||
return TrafficPublisherPlatforms | ||
} else if (objective === 'Reach' || objective === 'REACH') { | ||
return ReachPublisherPlatforms | ||
} else if (objective === 'Conversion' || objective === 'CONVERSIONS') { | ||
return ConversionPublisherPlatforms | ||
@@ -202,0 +258,0 @@ } |
{ | ||
"name": "@denimlabs/fb-position-validation", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "Validate facebook positions against denim campaign objectives.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
70843
1094