prebid / line-item-manager

Prebid Line Item Management Tool
Other
30 stars 17 forks source link

Snippet replaced when using size override #156

Open ivanMedios opened 1 month ago

ivanMedios commented 1 month ago

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:

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 commented 1 month ago

I confirm that I see the same bug.