Gamification
Run scratch cards, spin-the-wheel and other reward campaigns from CleverTap with Digia Engage: identify users, add the rewards page, set up webhooks.
Gamification campaigns, such as a wheel or a scratch card, give users rewards. Gamification is available in the Android, iOS, React Native and Flutter SDKs.
CleverTap decides who sees each campaign. Your campaign team connects it with digia_campaign_key. See Step 6: Connect CleverTap campaigns.
1. Identify users
Games need a user ID, and the user hash when user verification is on. Set them in Step 4: Identify users.
2. Open the rewards page
The rewards page shows the user's game chances and rewards. The SDK draws it. Open it from a "My rewards" button or a link. Identify the user before you open it.
- React Native
- Android
- iOS (Swift)
- Flutter
import { Button } from 'react-native';
import { Digia } from '@digia-engage/core';
export function RewardsButton() {
return <Button title="My rewards" onPress={() => Digia.openRewards()} />;
}
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import com.digia.engage.Digia
@Composable
fun RewardsButton() {
val context = LocalContext.current
Button(onClick = { Digia.openRewards(context) }) {
Text("My rewards")
}
}
import SwiftUI
import DigiaEngage
struct RewardsButton: View {
var body: some View {
Button("My rewards") {
Digia.openRewards()
}
}
}
import 'package:digia_engage/digia_engage.dart';
import 'package:flutter/material.dart';
class RewardsButton extends StatelessWidget {
const RewardsButton({super.key});
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: Digia.openRewards,
child: const Text('My rewards'),
);
}
}
To open it from a deep link, pass the link to Digia.handleDeepLink(uri). It opens the rewards
page for the SDK rewards link and returns false for anything else, so your own routing continues.
On iOS, including Flutter apps running on iOS, the rewards page needs iOS 17 or later.
3. Handle rewards on your server
- Webhooks: get a
reward.wonevent when a user wins. - Reward Used Callback: mark a reward as used.
- Reward Links: add a link to a reward.