Whether MediaTailor officially supports 302 redirect from ADS (AdServer) ?

1

Scenario

  1. MediaTailor calls my custom Ad Server with Primary Ad Server URL as an input
  2. My custom adserver feeds in some extra information inside Primary Ad Server URL
  3. My custom adserver issues 302 redirect with redirect response header containing Primary Ad Server's URL
  4. MediaTailor then calls Primary Ad Server using the URL mentioned in the redirect response header.
asked 3 years ago546 views
3 Answers
2

MediaTailor follows up to five levels of VAST wrappers and redirects in the VAST response. For straight up HTTP redirects, the maximum is 100. Ref: https://docs.aws.amazon.com/mediatailor/latest/ug/vast.html

If you need further assistance, please open a support ticket that includes your account id and EMT Configuration ARN

AWS
SUPPORT ENGINEER
answered 3 years ago
0

Hi, I am facing some issues with my custom Ad Server and have posted a question about the same. https://repost.aws/questions/QUyEmIdw2ORtmlvw_ufLTSSw/mediatailor-not-calling-my-sample-ad-decision-server-ads

I see that you already have a working custom Ad server. Will you be able to help me resolve my issue with the custom Ad Server?

answered 2 years ago
0

Adding on to Richard's answer above, the HTTP 302 redirect must contain a Location header that is properly encoded.

In our case, our custom ad server issued a 302 redirect to GAM like this: https://pubads.g.doubleclick.net/gampad/ads?iu=/12345/Demo/Demo_Mid_Roll&sz=400x300|640x360|640x384|640x480&vad_type=linear&gdfp_req=1&vpos=midroll&output=xml_vast4

Since the iu and sz parameters weren't properly URL encoded, we were met with an error ERROR_UNKNOWN and a description "Unknown error occurred during Ad Decision Server request".

Log entry from MediaTailor/AdDecisionServerInteractions log group:

{
  "eventTimestamp": "2024-08-25T01:11:12.031396033Z",
  "requestId": "Removed",
  "sessionType": "HLS",
  "eventType": "ERROR_UNKNOWN",
  "eventDescription": "Unknown error occurred during Ad Decision Server request",
  "awsAccountId": "Removed",
  "customerId": "Removed",
  "originId": "Removed",
  "sessionId": "Removed",
  "adsRequestUrl": "Removed",
  "requestHeaders": [
    {
      "name": "User-Agent",
      "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15"
    },
    {
      "name": "X-Device-User-Agent",
      "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15"
    },
    { "name": "X-Forwarded-For", "value": "Removed" }
  ]
}

Once we ensured that all query params were encoded, the 302 redirect worked.

Corrected Location header: https://pubads.g.doubleclick.net/gampad/ads?iu=%2F12345%2FDemo%2FDemo_Mid_Roll&sz=400x300%7C640x360%7C640x384%7C640x480&gdfp_req=1&vpos=midroll&output=xml_vast4

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions