> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamly.watch/llms.txt
> Use this file to discover all available pages before exploring further.

# Google AdSense Plugin

> Google AdSense theme slots — publisher ID, per-slot unit IDs, Settings → Ads, VAST preroll notes.

**Google AdSense** (`ads.google_adsense`) is a Streamly **plugin** in the **ads** category.

Fills Streamly theme banner slots with AdSense units. Watch **VAST preroll** is configured under Settings → Ads (not as an AdSense unit here).

## Learn the service

Watch this overview of the vendor platform (helpful before you paste keys into Streamly).

<Frame caption="How To Set Up Google Adsense — Howfinity.">
  <iframe src="https://www.youtube.com/embed/4Kvndhh4cKo" title="How To Set Up Google Adsense" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
</Frame>

## At a glance

| | |
| - | - |
| **Plugin ID** | `ads.google_adsense` |
| **Version** | 1.2.0 |
| **Also configure** | `/admin/settings?tab=ads` |

## Capabilities

* `ads.display`
* `ads.reporting`

## How it works

### Ads wiring

| Step | Where | What you do |
| - | - | - |
| **1** | `/admin/plugins` → AdSense | Paste publisher ID + ad unit IDs |
| **2** | `/admin/settings?tab=ads` | Enable Ads + set provider to Google AdSense |
| **3** | Theme | `AdSlot` mounts on landing placements |
| **4** | Optional | Set VAST preroll URL in Settings → Ads |

| Slot ID | Placement | Typical size |
| - | - | - |
| `landing_top` | Under nav | 728×90 |
| `landing_after_hero` | After hero | 728×90 |
| `landing_mid` | Mid feed | 300×250 |
| `landing_before_footer` | Before footer | 728×90 |
| `watch_preroll` | Watch pre-roll | VAST URL in Settings |

## Activation keys

Configure in `/admin/plugins` → **Google AdSense** → Configure. Secret fields stay server-side — never commit them or expose as `NEXT_PUBLIC_*` unless the key is intentionally public (e.g. Stripe publishable key).

| Key | Label | Required | Docs |
| - | - | - | - |
| `publisherId` | Publisher ID (`ca-pub-…`) | Yes | [Publisher ID](https://support.google.com/adsense/answer/105516) |
| `enable_landing_top` | Slot: Top | Optional | — |
| `landing_top` | Ad unit ID — Top | Optional | [Ad units](https://support.google.com/adsense/answer/9183566) |
| `enable_landing_after_hero` | Slot: After hero | Optional | — |
| `landing_after_hero` | Ad unit ID — After hero | Optional | [Ad units](https://support.google.com/adsense/answer/9183566) |
| `enable_landing_mid` | Slot: Mid feed | Optional | — |
| `landing_mid` | Ad unit ID — Mid feed | Optional | [Ad units](https://support.google.com/adsense/answer/9183566) |
| `enable_landing_before_footer` | Slot: Before footer | Optional | — |
| `landing_before_footer` | Ad unit ID — Before footer | Optional | [Ad units](https://support.google.com/adsense/answer/9183566) |

## Setup guide

<Steps>
  <Step title="Create units">AdSense display units sized per slot.</Step>
  <Step title="Configure plugin">Publisher ID + enable slots + unit IDs.</Step>
  <Step title="Master switch">Settings → Ads → enable → provider Google AdSense.</Step>
  <Step title="Optional preroll">VAST URL on the same Settings tab.</Step>
</Steps>

## Admin & Settings paths

| Path | Purpose |
| - | - |
| `/admin/plugins` | Units |
| `/admin/settings?tab=ads` | Master + provider + VAST |

## Official vendor documentation

* [Publisher ID](https://support.google.com/adsense/answer/105516)
* [Ad units](https://support.google.com/adsense/answer/9183566)
* [Get started](https://support.google.com/adsense/answer/9274634)

## FAQ

<AccordionGroup>
  <Accordion title="Slots configured but nothing shows">
    Check Settings → Ads master switch and provider. Also verify AdSense account approval / site ads.txt if required.
  </Accordion>
</AccordionGroup>

## Related

* [Ads (Admin)](/admin-dashboard/ads)
* [Adsterra](/plugins/adsterra)
* [Settings](/admin-dashboard/settings)
* [Plugins Overview](/plugins/overview)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.