Skip to content

Commit 5aaf3e3

Browse files
committed
feat: update testing app
1 parent 36bae96 commit 5aaf3e3

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

examples/expo-bare/src/Screen.tsx

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export const Screen = () => {
8686
<Text style={styles.sectionHeader}>Test Actions</Text>
8787
<Text style={styles.bullet}>
8888
Fire these on demand, then inspect the request body in the RN DevTools Network tab to
89-
confirm idfv/aaid/idfa/install_id/customer_user_id are attached.
89+
confirm idfv/aaid/idfa/install_id/customer_user_id/att_status/consent/session_id/
90+
app_version/build_number/os_version/locale/revenue fields are attached.
9091
</Text>
9192

9293
<Pressable onPress={() => DetourAnalytics.setUserId("test-user-123")}>
@@ -98,6 +99,50 @@ export const Screen = () => {
9899
>
99100
<Text style={styles.linkButton}>Log test event (purchase)</Text>
100101
</Pressable>
102+
103+
<Pressable
104+
onPress={() =>
105+
DetourAnalytics.logConversion({
106+
revenue: 9.99,
107+
currency: "USD",
108+
productId: "test_sku_1",
109+
quantity: 1,
110+
transactionId: "test-txn-001",
111+
})
112+
}
113+
>
114+
<Text style={styles.linkButton}>Log test conversion (revenue)</Text>
115+
</Pressable>
116+
117+
<Pressable
118+
onPress={() =>
119+
DetourAnalytics.setConsent({ ad: true, analytics: true, tracking: true })
120+
}
121+
>
122+
<Text style={styles.linkButton}>Set consent: all granted</Text>
123+
</Pressable>
124+
125+
<Pressable
126+
onPress={() =>
127+
DetourAnalytics.setConsent({ ad: false, analytics: false, tracking: false })
128+
}
129+
>
130+
<Text style={styles.linkButton}>Set consent: all denied</Text>
131+
</Pressable>
132+
133+
<Pressable
134+
onPress={() => DetourAnalytics.setAdvertisingId("11111111-2222-3333-4444-555555555555")}
135+
>
136+
<Text style={styles.linkButton}>Override advertising id (manual)</Text>
137+
</Pressable>
138+
139+
<Pressable onPress={() => DetourAnalytics.setTrackingAuthorizationStatus("granted")}>
140+
<Text style={styles.linkButton}>Override ATT status: granted</Text>
141+
</Pressable>
142+
143+
<Pressable onPress={() => DetourAnalytics.setTrackingAuthorizationStatus("denied")}>
144+
<Text style={styles.linkButton}>Override ATT status: denied</Text>
145+
</Pressable>
101146
</View>
102147
</ScrollView>
103148
</View>

0 commit comments

Comments
 (0)