2.1 KiB
2.1 KiB
ADDED Requirements
Requirement: Modal CTAs for YouTube and Spotify
The media modal MUST render two CTA actions:
- "Follow on YouTube" / "Follow on Spotify" — links to the channel/podcast profile page
- "View on YouTube" / "View on Spotify" — links to the specific content item URL
The CTA label and destination MUST be determined by the content source:
- For
youtubesource: "Follow on YouTube" links to the YouTube channel URL, "View on YouTube" links to the video URL - For
podcastsource: "Follow on Spotify" links to the podcast profile URL, "View on Spotify" links to the episode URL
Each CTA MUST be rendered using the existing CtaLink component conventions (or equivalent markup) with UTM parameters appended.
Scenario: YouTube video modal shows YouTube CTAs
- WHEN the media modal is displaying a YouTube video
- THEN the modal renders "Follow on YouTube" (linking to the channel) and "View on YouTube" (linking to the video URL) as CTA actions
Scenario: Podcast episode modal shows Spotify CTAs
- WHEN the media modal is displaying a podcast episode
- THEN the modal renders "Follow on Spotify" (linking to the podcast profile) and "View on Spotify" (linking to the episode URL) as CTA actions
Requirement: Modal CTA tracking
Each CTA rendered inside the media modal MUST emit a cta_click event conforming to the existing CTA tracking requirements.
The modal CTAs MUST use:
placement=media_modaltarget_idfollowing themodal.cta.{action}.{platform}namespaceplatformset toyoutubeorspotify(mapped from content source)
Scenario: Modal CTA emits cta_click event
- WHEN a user clicks the "View on YouTube" CTA inside the media modal
- THEN the system emits a
cta_clickevent withtarget_id=modal.cta.view.youtube,placement=media_modal,platform=youtube, andtarget_urlset to the video URL
Scenario: Modal CTA includes UTM parameters
- WHEN a modal CTA is rendered
- THEN the CTA link URL includes UTM parameters for attribution (utm_source, utm_medium, utm_campaign, utm_content)