Developer GuideCookbookVAST: Google Ad Manager Setup

VAST: Google Ad Manager Setup

Context: Supply source (Publisher) using Google Ad Manager (GAM) as their ad server. Add Praevis Exchange as a third-party VAST demand source.


Step 1: Get your Supply Source ID

Praevis dashboard → Supply → click your supply source → Settings → copy Supply Source ID.


Step 2: Build your VAST tag for GAM

Praevis VAST URL with GAM macros:

https://rtb.praevis.com/vast?site_id={PUBLISHER_ID}&w=%%WIDTH%%&h=%%HEIGHT%%&ip=%%PATTERN:USER_IP%%&ua=%%PATTERN:USER_AGENT%%&did=%%ADVERTISING_IDENTIFIER%%&content_genre=%%PATTERN:CONTENT_GENRE%%

Replace {PUBLISHER_ID} with your UUID. GAM macros use %%MACRO%% syntax.


GAM macro mapping

Praevis parameterGAM macroNotes
site_idYour Supply Source UUID (static)Hard-code
w%%WIDTH%%Ad unit width
h%%HEIGHT%%Ad unit height
ip%%PATTERN:USER_IP%%Viewer IP address
ua%%PATTERN:USER_AGENT%%Browser/device user agent
did%%ADVERTISING_IDENTIFIER%%IDFA/GAID for mobile
content_genre%%PATTERN:CONTENT_GENRE%%Custom key-value (see below)

%%PATTERN:USER_IP%% and %%PATTERN:USER_AGENT%% are only available for GAM 360 accounts. For standard GAM, use %%IP%% and %%UA%% if available, or contact your GAM representative.


Step 3: Pass content genre as a key-value

GAM doesn’t have a native content genre macro. Use a custom key-value:

  1. GAM → Inventory → Key-values → New key-value
  2. Name: content_genre
  3. Type: Free-form
  4. Add common values: drama, sport, news, comedy, documentary

In your video player, set the key-value before the ad request:

// Example for IMA SDK
googletag.pubads().setTargeting('content_genre', 'drama');

This passes the genre through GAM’s ad request into the Praevis VAST tag macro.


Step 4: Create the GAM line item

  1. GAM → Delivery → Line items → New line item
  2. Type: Third-party (or “Ad Exchange” if using AdX header)
  3. Ad tag URL: Paste your Praevis VAST URL
  4. Size: Match your video player (1920×1080, 1280×720, 640×480)
  5. Priority: Set below AdX if you want Praevis as remnant, or above for testing

Step 5: Create the creative

  1. Under your line item → Add creative → Third-party
  2. Type: VAST redirect
  3. Redirect URL: Your Praevis VAST tag URL
  4. Duration: Match your expected creative duration (15s or 30s)

Step 6: Test with GAM preview tool

  1. GAM → your line item → Preview
  2. Use VAST inspector to fire the tag and view the response
  3. Verify: VAST XML is valid, <MediaFile> URL resolves, impression tracking pixel present

Step 7: Traffic and monitor

Enable the line item. Monitor in:

  • GAM: Impressions, fill rate per line item
  • Praevis: Revenue and fill rate per supply source (60s lag)

Common GAM issues

Line item not serving Check that the line item targets the correct ad unit, is active, and has an end date in the future. Verify the creative is approved (GAM scans creatives before serving).

VAST error in GAM’s inspector Praevis returns VAST 4.0. If GAM requires VAST 2.0, add &vast_version=2 to your tag URL.

IP macro not resolving If %%PATTERN:USER_IP%% shows literally in the fired URL, the macro isn’t supported in your GAM tier. Check with your Google account manager — it’s a GAM 360 feature.

Impression count discrepancy (GAM vs Praevis) GAM counts an impression when the creative begins rendering. Praevis counts when the VAST impression pixel fires (which the player triggers). Typical discrepancy: 2–5%. Larger gaps indicate player issues.