SwAdText
Ad Placement Four Essentials
- Use case: text link slots below the nav bar / at the page top (slotKey e.g.
top_links)- Industry form: Text link ads (AdSDK format
text)- Visual form: plain text links in single / multiple columns
- Tracking events: same as banner —
adImpression(once on entering the viewport via IntersectionObserver) /adClick; built-in zero-config, silent no-op when the tracker gate is offPicking the wrong scenario = wrong
ad_type/ timing in tracking. See Ad Component Selection.
SwAdText is the text ad slot component — a "text-card-type" self-rendering component of the ad foundation, for image-free copy ads (text links / promo slots). It supports cell (single-column text links) and grid (text grid) layouts. Impression / click tracking is built in.
Text links (cell)
加载中...
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
items | SwAdItem[] | ✓ | — | Ad creative array (uses title as copy) |
slotKey | string | ✓ | — | Ad slot key → ad_slot_key |
slotName | string | undefined | Ad slot name → ad_slot_name | |
pageKey | string | undefined | Page key → page_key | |
pageName | string | undefined | Page name → page_name | |
showAdLabel | boolean | undefined | "Ad" compliance badge (inline variant, appended at the end of each line; stays fully visible even when the text truncates to an ellipsis); when not set it follows the global swiftConfig.ad.showLabel (default true), an explicit value always wins | |
layout | 'cell' | 'grid' | 'cell' | Layout: single-column links / text grid | |
gridColumns | number | 3 | grid columns | |
gridGap | number | 8 | grid gap (px) |
Events
| Name | Payload | Description |
|---|---|---|
load | — | Rendered |
empty | — | items empty |
impression | items: SwAdItem[] | Impression (auto tracking) |
click | item: SwAdItem | Click (auto tracking) |
error | — | Render / load error |
Text grid (grid, 3 columns)
加载中...
Events (load/impression/click log)
加载中...
gridColumns / gridGap tuning
加载中...
Empty @empty (zero render)
加载中...
<SwAdText :items="textAds" slot-key="footer_text_ad" show-ad-label />
Caveats
- Copy comes from
item.title;item.imageis optional for pure text ads. - Tracking is built in and gated.