reportPipClicked method

void reportPipClicked({
  1. required String elementId,
  2. required String actionType,
  3. required PipState state,
  4. required String ctaRole,
})

SDK chrome taps on the PiP itself — expand, collapse, close, mute, play.

Digia-only. None of these is a CEP engagement signal: expanding is intent, not conversion, and forwarding a mute toggle as ExperienceClicked would inflate CTR against every other campaign type. Only an authored CTA does that, in reportPipStepClicked. ctaRole follows the same convention as an authored CTA's: primary for the one chrome action that is real click-through (opening full screen), secondary for the rest. It decides whether this tap moves the headline CTR/dismissal-rate tiles — see PipClicked.ctaRole.

Implementation

void reportPipClicked({
  required String elementId,
  required String actionType,
  required PipState state,
  required String ctaRole,
}) {
  final payload = _pipOrchestrator.state?.payload;
  if (payload == null) return;
  _events.toDigia(
    PipClicked(
      elementId: elementId,
      actionType: actionType,
      pipState: state.name,
      ctaRole: ctaRole,
      timeToActionMs: _dwellTracker.elapsedMs(payload.cepCampaignId),
    ),
    payload,
  );
}