reportFloaterStoryClicked method

void reportFloaterStoryClicked({
  1. required String elementId,
  2. required String actionType,
  3. required String ctaRole,
  4. String? ctaLabel,
  5. String? actionUrl,
})

SDK chrome taps on the window itself — opening the story, and the ×.

Digia-only, like the PiP's. Opening the story is intent rather than conversion, and forwarding it as ExperienceClicked would inflate CTR against every other campaign type.

Implementation

void reportFloaterStoryClicked({
  required String elementId,
  required String actionType,
  required String ctaRole,
  String? ctaLabel,
  String? actionUrl,
}) {
  final payload = _floaterStoryOrchestrator.state?.payload;
  if (payload == null) return;
  _events.toDigia(
    PipClicked(
      elementId: elementId,
      actionType: actionType,
      // The window is the collapsed state; the story is the expanded one.
      pipState: _floaterStoryOrchestrator.storyOpen
          ? PipState.expanded.name
          : PipState.collapsed.name,
      ctaRole: ctaRole,
      ctaLabel: ctaLabel,
      actionUrl: actionUrl,
      timeToActionMs: _dwellTracker.elapsedMs(payload.cepCampaignId),
    ),
    payload,
  );
}