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

Use universal creative #74

Merged
merged 2 commits into from
May 20, 2019
Merged

Conversation

dlackty
Copy link
Contributor

@dlackty dlackty commented May 20, 2019

I've used this for a while for our AMP banners, and decided to send a PR. This closes #73.

@kmjennison kmjennison merged commit b76748d into kmjennison:master May 20, 2019
@kmjennison
Copy link
Owner

@dlackty Thank you for the contribution!

@Austinb
Copy link

Austinb commented Sep 24, 2019

FYI the creative merged is incomplete. Missing the hb_pb value - http://prebid.org/dev-docs/show-prebid-ads-on-amp-pages.html#html-creative

@kmjennison
Copy link
Owner

@Austinb Thanks. I think the Prebid website docs are out of date. The universal creative code (linked as "latest version" from the Prebid docs) show that hb_pb isn't necessary on DFP:
https://github.com/prebid/prebid-universal-creative/blob/master/template/amp/dfp-creative.html

@Austinb
Copy link

Austinb commented Sep 24, 2019

If it is not needed any more that is fine it was that the version merged in did not match the docs from prebid or from the universal creative link.

Edit: I see the comments in that link where it DFP(GAM) doesnt need the bid value anymore. Not sure what is going on with the information being different all over. Thanks.

@adops-tcs
Copy link

adops-tcs commented Feb 17, 2020

Does this universal code work with "send all bids" scenario? the documentation on prebid.org says otherwise.

<script src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
<script>
  var ucTagData = {};
  ucTagData.adServerDomain = "";
  ucTagData.pubUrl = "%%PATTERN:url%%";
  ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;

  try {
    ucTag.renderAd(document, ucTagData);
  } catch (e) {
    console.log(e);
  }
</script>

@kmjennison
Copy link
Owner

@adops-tcs That's correct. The Prebid universal creative Github page also mentions this. For a "send all bids" setup, you'd want to use this creative.

Note that when "send all bids" is enabled, Prebid still sends hb_bidder and hb_pb keys, so the default universal creative still works to select the correct line item.

@adops-tcs
Copy link

adops-tcs commented Feb 18, 2020

Thank you for your explanation @kmjennison ! However, I am still confused. I understood the dfp-prebid-setup code to be made for "send all bids" scenario since it's designed to create a set of line items per each bidder. However, the creative snippet is not what should be used for "send all bids". Can you clarify please? Below is the creative snippet from one of the auto-generated creatives. It's also missing ucTagData.hbPb = "%%PATTERN:hb_pb%%"; line (if compared to the snippet from here: https://github.com/prebid/prebid-universal-creative.

<script src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
<script>
  var ucTagData = {};
  ucTagData.adServerDomain = "";
  ucTagData.pubUrl = "%%PATTERN:url%%";
  ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;

  try {
    ucTag.renderAd(document, ucTagData);
  } catch (e) {
    console.log(e);
  }
</script>

@kmjennison
Copy link
Owner

@adops-tcs The hb_pb isn't necessary in the creative for GAM (see this comment above).

You're correct that this tool creates an order per bidder. However, those line items are targeted on the general hb_bidder and hb_pb key-values, not on any bidder-specific keys like hb_bidder_appnexus. That means GAM will only match line items for the winning bids. It won't consider any of the other targeting provided by "send all bids".

I'm curious if you'd find the full "send all bids" setup helpful for some reason, such as reporting in GAM. If so, we can create an issue for it.

@adops-tcs
Copy link

It makes sense now, thanks again @kmjennison ! I actually modified the code as suggested here (#18 (comment)) to create one set of line items for all bidders. I was confused on "send all bids" part because I had been researching that option as well and saw the creative snippet not matching. It's all good now.

@dlackty dlackty deleted the universal-creative branch March 20, 2020 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to Prebid's "universal creative"
4 participants