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 off

Picking 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

NameTypeRequiredDefaultDescription
itemsSwAdItem[]✓—Ad creative array (uses title as copy)
slotKeystring✓—Ad slot key → ad_slot_key
slotNamestringundefinedAd slot name → ad_slot_name
pageKeystringundefinedPage key → page_key
pageNamestringundefinedPage name → page_name
showAdLabelbooleanundefined"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
gridColumnsnumber3grid columns
gridGapnumber8grid gap (px)

Events

NamePayloadDescription
load—Rendered
empty—items empty
impressionitems: SwAdItem[]Impression (auto tracking)
clickitem: SwAdItemClick (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.image is optional for pure text ads.
  • Tracking is built in and gated.