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

Snippet replaced when using size override #156

Open
ivanMedios opened this issue Jul 19, 2024 · 1 comment
Open

Snippet replaced when using size override #156

ivanMedios opened this issue Jul 19, 2024 · 1 comment

Comments

@ivanMedios
Copy link

  • line-item-manager version: line-item-manager==0.2.12

  • Python version: 3.11

  • Operating System: MacOs

Description

I try to set size override for multiple sizes and it works well, but replace my snippet.
how can I use the size override, and the snipper for all bids like these:

creative: # at least one of the following types is required {video, banner}
name: "{{ bidder_name }}-{{ media_type }}"
banner:
# safe_frame: False # optional: defaults to True
size_override: True # optional: defaults to True with a 1x1 creative
sizes: # list
- height: 250
width: 300
- height: 280
width: 336
- height: 50
width: 300
- height: 100
width: 300
- height: 100
width: 320
- height: 50
width: 320
- height: 90
width: 728
- height: 100
width: 940
- height: 90
width: 970
- height: 250
width: 970
- height: 200
width: 970
- height: 250
width: 1140
- height: 600
width: 300
snippet: |
<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.adId = "%%PATTERN:hb_adid_{{ bidder_code }}%%";
ucTagData.cacheHost = "%%PATTERN:hb_cache_host_{{ bidder_code }}%%";
ucTagData.cachePath = "%%PATTERN:hb_cache_path_{{ bidder_code }}%%";
ucTagData.uuid = "%%PATTERN:hb_cache_id_{{ bidder_code }}%%";
ucTagData.mediaType = "%%PATTERN:hb_format_{{ bidder_code }}%%";
ucTagData.env = "%%PATTERN:hb_env%%";
ucTagData.size = "%%PATTERN:hb_size_{{ bidder_code }}%%";
ucTagData.hbPb = "%%PATTERN:hb_pb_{{ bidder_code }}%%";
// mobileResize needed for mobile GAM only
ucTagData.mobileResize = "hb_size:%%PATTERN:hb_size_{{ bidder_code }}%%";
try {
ucTag.renderAd(document, ucTagData);
} catch (e) {
console.log(e);
}
</script>

What I Did

After running it create the overrides correctly but replace my snipper with in GAM with:

<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/%%PATTERN:hb_format%%.js"></script> <script> var ucTagData = {}; ucTagData.adServerDomain = ""; ucTagData.pubUrl = "%%PATTERN:url%%"; ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%; ucTagData.hbPb = "%%PATTERN:hb_pb%%"; try { ucTag.renderAd(document, ucTagData); } catch (e) { console.log(e); } </script>
Paste the command(s) you ran and the output.  And if relevant, attach your YAML config file.
If there was a crash, please include the traceback here.
@salvoaranzulla
Copy link

I confirm that I see the same bug.

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

No branches or pull requests

2 participants