Step 5: Track events
Send user actions such as add_to_cart to Digia Engage with trackEvent, so event-triggered campaigns fire. Covers naming and property rules.
Tell Digia when the user does something your campaigns care about, such as adding to cart or placing an order.
- React Native
- Android
- iOS (Swift)
- Flutter
Digia.trackEvent('add_to_cart', { product_id: 'sku_8812', price: 499 });
Digia.trackEvent("add_to_cart", mapOf("product_id" to "sku_8812", "price" to 499))
Digia.trackEvent(name: "add_to_cart", properties: ["product_id": "sku_8812", "price": 499])
Digia.trackEvent('add_to_cart', properties: {'product_id': 'sku_8812', 'price': 499});
- Names are case-sensitive, up to 120 characters.
- Property values can be text, numbers, true/false, or lists of those.
- It never slows your app. Events are sent in the background.
- Track the result, not the tap. Send
order_placedafter the order succeeds, not when the user taps Pay.
Events show up in the dashboard under Data → Events once your app sends them.
warning
Keep personal data out of events. Every event you send is stored on Digia's servers for 180 days. Don't put names, phone numbers, email addresses or similar in event names or properties, and list Digia in your privacy disclosures.