Ads Demo GAM AdSense Video

Google Ad Manager + AdSense Integration — caixianzhou.com

GAM Configuration

GAM (GPT)
AdSense
Video Ads
Event Logs
GAM
0
GAM Slots Defined
0
GAM Ads Loaded
0
GAM Impressions
$0.00
Est. Revenue

GAM Content Area

Google Ad Manager (GAM)

Uses the Google Publisher Tag (GPT) library for advanced ad serving. Supports custom targeting, key-values, yield optimization, and third-party ad networks. Network code is required to serve ads.

Ad Unit Structure

Top Banner: /6355419/Travel/Europe/France/Paris (728x90)
In-Content: /6355419/Travel/Europe/France/Paris (300x250)
Sidebar: /6355419/Travel/Europe/France/Paris (300x250)
Bottom Banner: /6355419/Travel/Europe/France/Paris (728x90)

6355419 is Google's official web GPT demo network (21775744923 is for mobile SDK only — web slots stay empty).

GAM

Setup Steps

1. Create a GAM account at admanager.google.com
2. Get your Network Code from Admin → Network settings
3. Create ad units under Inventory → Ad units
4. Create line items and link creatives
5. Enter Network Code above and click Apply

GPT API Reference

googletag.defineSlot(path, sizes, divId) → defines an ad slot
googletag.pubads().setTargeting(key, value) → page-level targeting
googletag.pubads().enableSingleRequest() → SRA mode
googletag.display(divId) → renders the ad

GAM

AdSense Manual Units

Enter numeric data-ad-slot IDs from AdSense → Ads → By ad unit. auto is invalid and returns HTTP 400. Leave empty to use head-script auto-ads only (no manual slots).

AdSense Auto-ads (head script) or apply slot ID above
0
Ad Loads
0
Impressions
0
Clicks
1
Page Views

AdSense Content Area

AdSense Integration

This page is integrated with Google AdSense (pub-8328116196212729). Ad units are automatically served by Google. Auto-ads is enabled for optimal placement.

Ad Units

Top Banner: 728x90 leaderboard. In-content: 336x280 rectangle. Sidebar: 300x250 medium rectangle. Auto-ads fills additional placements.

AdSense Awaiting slot ID

How It Works

Google AdSense automatically crawls page content and serves relevant ads. Revenue is tracked in your AdSense dashboard at adsense.google.com.

AdSense Awaiting slot ID
0
Video Ads Loaded
0
Video Impressions
0
Ads Completed
0
Ads Skipped

In-Stream Video Ad (IMA SDK)

Pre-roll/mid-roll/post-roll video ad played inside a video content player. Uses Google IMA SDK to request VAST ads and overlay them on the video. Click "Play with Ad" to start content + pre-roll ad.

In-Stream Configuration

Outstream Video Ad (GPT)

Auto-playing video ad that does not require a content video player. The video starts playing automatically when the ad unit scrolls into view. Uses GPT's outstream format with googletag.defineSlot and googletag.defineOutOfPageSlot.

OUTSTREAM Outstream video will auto-play when in view

Rewarded Video Ad (激励视频)

User watches a full video ad to earn a reward (extra life, coins, power-up, etc.). The ad cannot be skipped — the reward is only granted after the ad completes. This is the most common ad format in mobile games for monetization.

🎮
Level 3 — Game Over
Watch an ad to continue?
💰 150
COINS
❤️ 2
LIVES
Click to watch a rewarded video ad

Rewarded Ad Configuration

How Rewarded Ads Work

1. User clicks "Watch Ad for Reward" — a video ad starts playing.
2. The ad cannot be skipped — the close button appears only after the ad completes.
3. When the ad finishes, the reward is granted (life, coins, power-up, etc.).
4. If the user closes the ad early, no reward is given.

Demo Note: Google's test network (6355419) has limited video creatives. For real rewarded ads with fill, use your own GAM network code and create a video ad unit with a line item that serves VAST/linear creatives. Try the "Quick Test Tag" dropdown for alternative tags.

Key difference from other video ads: Rewarded ads are user-initiated (opt-in), have the highest eCPM, and require the user to watch the entire ad. This is the #1 monetization format in mobile gaming.

IMA Rewarded Ads Guide | GAM Rewarded Ads Setup

Ad Event Logs

Real-time events from GAM and AdSense. Useful for debugging ad serving.

[--:--:--] Waiting for ad events...