gamificationAssignedEvent function
The GamificationAssigned chance event the SDK derives from a grant
answer: the server assigned a chance to this user. holdout is true when
the grant came back without show, or was denied for holdout — the
chance is saved (or nothing is) but the game must not open. The chanceId
rides along when the answer carried one. Never throws.
Implementation
ChanceAnalyticsEvent gamificationAssignedEvent({
required String campaignId,
String chanceId = '',
required bool holdout,
String? eventId,
String? occurredAt,
}) =>
ChanceAnalyticsEvent(
eventName: 'GamificationAssigned',
eventId: _synthesizedId(eventId, campaignId, chanceId, 'assigned'),
occurredAt: occurredAt ?? _nowIso(),
campaignId: campaignId,
values: {
if (chanceId.isNotEmpty) 'chance_id': chanceId,
'holdout': holdout,
},
);