Before you can send Mobile Push campaigns through Engage Studio, you need to configure Firebase Cloud Messaging (FCM) and integrate it with Treasure Data. This guide walks through the complete setup process for both Android and iOS platforms.
- Firebase Project: A Firebase project with Cloud Messaging enabled
- Apple Developer Account: Required for iOS push notifications (APNs)
- Treasure Data Account: With appropriate permissions to configure integrations
Mobile Push notifications in Engage Studio work through the following flow:
- Campaign Creation: You create a campaign in Engage Studio with target audience and content
- Delivery Pipeline: Engage Studio sends device tokens and payload to Firebase Cloud Messaging
- FCM/APNs: Firebase delivers notifications to Android (via FCM) and iOS (via APNs)
- Mobile App: Your app receives the notification and tracks user actions
- Event Tracking: App sends events back to Treasure Data for analytics
┌─────────────────┐
│ Engage Studio │
│ Campaign │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Firebase │
│ Cloud │
│ Messaging │
└────────┬────────┘
│
┌────┴────┐
│ │
▼ ▼
┌────────┐ ┌────────┐
│ FCM │ │ APNs │
│Android │ │ iOS │
└───┬────┘ └───┬────┘
│ │
▼ ▼
┌──────────────────┐
│ Mobile App │
│ (Customer-built) │
└────────┬─────────┘
│
▼
┌─────────────────┐
│ Treasure Data │
│ (Event Logs) │
└─────────────────┘- Go to the Firebase Console
- Click Add project or select an existing project
- Follow the wizard to complete project creation
- In the Firebase Console, click the Android icon
- Enter your Android package name (e.g.,
com.example.myapp)- This must match the
applicationIdin yourbuild.gradlefile
- This must match the
- Optionally enter app nickname and SHA-1 certificate
- Click Register app
- Download the
google-services.jsonfile- Place this file in your Android app's
app/directory
- Place this file in your Android app's
- Follow the SDK setup instructions (covered in the Android Developer Guide)
- In the Firebase Console, click the iOS icon
- Enter your iOS bundle ID (e.g.,
com.example.myapp)- This must match the Bundle Identifier in Xcode
- Optionally enter app nickname and App Store ID
- Click Register app
- Download the
GoogleService-Info.plistfile- Add this file to your Xcode project root
- Follow the SDK setup instructions (covered in the iOS Developer Guide)
This step is required for iOS push notifications. Android uses FCM directly and does not need APNs.
- Log in to the Apple Developer Portal
- Navigate to Certificates, Identifiers & Profiles > Keys
- Click the + button to create a new key
- Enter a key name (e.g., "My App APNs Key")
- Check Apple Push Notifications service (APNs)
- Click Continue and then Register
- Download the
.p8key file- Important: Save this file securely — you can only download it once
- In the Firebase Console, go to Project Settings > Cloud Messaging
- Under Apple app configuration, click Upload
- Provide the following information:
- APNs Authentication Key: Upload your
.p8file - Key ID: Found in the Apple Developer Portal under Keys
- Team ID: Found in the Apple Developer Portal under Membership
- APNs Authentication Key: Upload your
- Click Upload
To send push notifications from Engage Studio, you need to configure the Firebase integration in Treasure Data's Integration Hub.
- Log in to Treasure Data Console
- Navigate to Integration Hub > Catalog
- Search for Firebase Cloud Messaging (Streaming Egress Connector)
- Click Create Authentication
- Configure the authentication:
| Field | Description | Example |
|---|---|---|
| Authentication Name | A descriptive name for this configuration | fcm-production |
| Firebase Project ID | Your Firebase project ID from the Firebase Console | my-app-12345 |
| Service Account JSON | JSON key file from Firebase Console (Settings > Service Accounts > Generate new private key) | Upload the downloaded JSON file |
- Click Save
The Treasure Engage Connector is used to authenticate campaign delivery from Engage Studio.
- Navigate to Integration Hub > Catalog
- Search for Treasure Engage
- Click Create Authentication
- Configure the authentication:
| Field | Description |
|---|---|
| Authentication Name | A descriptive name for this connector Example: engage-master-key |
| Master API Key | Your Treasure Data Master API Key Security Note: This key has full account access. Store it securely and rotate it regularly. |
- Click Save
You can verify your Firebase setup by sending a test notification:
- In Firebase Console, go to Cloud Messaging
- Click Send your first message
- Enter a notification title and text
- Click Send test message
- Enter a device FCM token (you can get this from your app logs after implementing the developer guide)
- Verify the notification appears on your device
In the Treasure Data Console:
- Navigate to Integration Hub > Authentications
- Verify both authentications appear in the list:
- Firebase Cloud Messaging (Streaming Egress)
- Treasure Engage
- Check that their status shows as Active
At this point, your Firebase and Treasure Data integrations are configured. The next step is to implement push notification handling in your mobile apps.
Unlike some marketing platforms, Treasure Data does not provide a pre-built SDK for mobile push notifications. Your development team must implement the following functionality in your Android and iOS apps:
- FCM/APNs Token Registration: Obtain device tokens and send them to Treasure Data
- Notification Display: Handle incoming push notifications
- User Action Tracking: Track delivery, open, dismiss, and link/deeplink events
- Event Upload: Send event data to Treasure Data Ingest API
For detailed implementation instructions, see:
- Never commit API keys to source control: Use environment variables or secure key management services
- Rotate keys regularly: Change your Master API Key and Firebase service account keys periodically
- Use separate keys for development and production: Create distinct Firebase projects and Treasure Data write keys for each environment
- Restrict key permissions: Use write-only keys for app-side event tracking
When generating your Firebase service account JSON:
- Navigate to Firebase Console > Project Settings > Service Accounts
- Click Generate new private key
- Store the downloaded JSON file securely
- Ensure the service account has only the minimum required permissions:
- Firebase Cloud Messaging API: Enabled
- Remove any unnecessary roles
Possible Causes:
- APNs key not uploaded to Firebase
- Bundle ID mismatch between Xcode and Firebase
- Notification permissions not granted on device
- App not properly registered for remote notifications
Solutions:
- Verify APNs key is correctly uploaded in Firebase Console
- Check Bundle ID matches exactly (case-sensitive)
- Check notification permission status in iOS Settings > Notifications
- Review implementation in iOS Developer Guide
Possible Causes:
google-services.jsonnot added to project- Package name mismatch
- Firebase Cloud Messaging not enabled
- Device offline or FCM token expired
Solutions:
- Verify
google-services.jsonis in theapp/directory - Check package name in
build.gradlematches Firebase registration - Ensure FCM is enabled in Firebase Console
- Request a new FCM token from the device
- Review implementation in Android Developer Guide
Possible Causes:
- Incorrect Master API Key
- Firebase service account JSON is invalid or expired
- Incorrect Firebase Project ID
Solutions:
- Verify Master API Key is correct and active
- Generate a new service account key from Firebase Console
- Double-check the Firebase Project ID (found in Firebase Console > Project Settings)
After completing this setup:
Implement mobile app functionality:
Create your first campaign:
Set up event tracking: