Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support video line items #61

Closed
drwaqarakram opened this issue Nov 18, 2018 · 4 comments
Closed

Support video line items #61

drwaqarakram opened this issue Nov 18, 2018 · 4 comments

Comments

@drwaqarakram
Copy link

Hey can we use this tool for video line items as well,

For Prebid for video

http://prebid.org/adops/setting-up-prebid-video-in-dfp.html

@kmjennison
Copy link
Owner

With some modifications to the creative (see code here), you should be able to. I haven't tried it myself, but it looks like you'd use the VAST redirect creative type: https://developers.google.com/ad-manager/api/reference/v201802/CreativeService.VastRedirectCreative

@schoenbl
Copy link

schoenbl commented Sep 4, 2019

@mwaqarakram94 were you ever able to configure this?

I have my creative config set to:
config = { 'name': name, 'advertiserId': advertiser_id, 'vastRedirectType': 'LINEAR', 'vastXmlUrl': 'https://prebid.adnxs.com/pbc/v1/cache?uuid=%%PATTERN:hb_uuid%%', }

And I'm receiving an error of: KeyError: 'vastRedirectType'

@kmjennison kmjennison changed the title Can this be used for Video Line items? Support video line items Sep 9, 2019
@andrew-sotiriou
Copy link

andrew-sotiriou commented Oct 30, 2019

Not sure if anyone else is still having this issue but I figured it out. There are two files that you need to make changes. In create_creatives.py update the config to look like this:
config = {
'xsi_type': 'VastRedirectCreative',
'name': name,
'advertiserId': advertiser_id,
'size': {
'width': '640',
'height': '480'
},
'vastRedirectType': 'LINEAR',
'duration': '60000',
'vastXmlUrl': 'https://prebid.adnxs.com/pbc/v1/cache?uuid=%%PATTERN:hb_uuid_BIDDERCODE%%',
}

And in create_line_items.py update the line_items_config to look like this:
line_item_config = {
'name': name,
'orderId': order_id,
'targeting': {
'inventoryTargeting': {},
'customTargeting': top_set,
'requestPlatformTargeting': 'VIDEO_PLAYER'
},
'startDateTimeType': 'IMMEDIATELY',
'unlimitedEndDateTime': True,
'lineItemType': 'PRICE_PRIORITY',
'costType': 'CPM',
'costPerUnit': {
'currencyCode': currency_code,
'microAmount': cpm_micro_amount
},
'creativeRotationType': 'EVEN',
'primaryGoal': {
'goalType': 'NONE'
},
'creativePlaceholders': creative_placeholders,
'environmentType': 'VIDEO_PLAYER',
}

That should allow you to create the video line items. You may need to make some tweaks for your specific instance but that should work.

@kmjennison -> The above should be the solution to this. Unsure how you would make it configurable but that should do the trick.

@kmjennison
Copy link
Owner

@andrew-sotiriou Thanks! Implementing #84 should make the tool flexible enough to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants