BigQuery - data export
Connect your OneSignal Application to send data to BigQuery
OneSignal BigQuery integration overview
Overview
We understand that gaining deeper insights into engagement is essential for our customers to drive successful messaging strategies. By integrating with OneSignal’s BigQuery Data Export functionality, you can automatically sync your messaging event data directly to your BigQuery project—eliminating the need for manual exports and giving you immediate access to a centralized data source for advanced analysis
This integration empowers you to perform in-depth analyses of your engagement data across key channels, including email, push notifications, in-app messages, and SMS. You can leverage this data to build custom dashboards, uncover trends, and generate actionable reports for leadership and cross-functional teams.
Currently, the integration supports data exports for events tied to sent messages and related engagement actions (such as clicks, opens, and more). We are continuously expanding our export capabilities and plan to offer additional event types in the near future to provide an even more comprehensive view of your users’ journeys.
Requirements
OneSignal
Google Cloud Platform
- Google Cloud Platform account
- App connected to an Organization with active billing account
BigQuery
- Active BigQuery account
- Credentials for your BigQuery account
Setup
Create a service account
Log in to your Google Cloud Platform account
After you login, ensure the proper project is selected.
Create a service account
Visit the Create Service Account page and click Create Service Account.
Fill out the fields.
Give it any name and service account ID you choose.
Assign the 'BigQuery User' role
Give the service account the “BigQuery User” role.
Create a service account key
Create a key file for your service account. The service account key must be in JSON format. Make a note of all the contents of the JSON file. You will need it to configure the integration.
Navigate to Service Accounts in the GPC Dashboard
Select your BigQuery Service Account
Service Accounts page
Under Keys, select Add Key → Create New Key → JSON
Service Account Keys
Download and open the file
Example of the Service Account Key:
Connect OneSignal
Activate the integration
In OneSignal, navigate to Data > Integrations > BigQuery
Enter the details
Copy the configuration details from the Service Account Key JSON file you downloaded in the previous step
Configure the integration
- Sync Frequency: as often as every 15 minutes
- Dataset/Table Names: pre-set as
onesignal_events_<app-id>
andmessage_events
(editable) - Event Types: choose which to sync—select all or just what you need
Select events
Select the events you care to receive in your BigQuery dataset.
OneSignal event export settings screen showing sync status, dataset configuration, and selected message event types.
Complete the setup
Click Save and wait for the success confirmation
Generate message events
Send messages via push, email, in-app, or SMS to trigger events that will sync based on your Integration Settings. You can update which events to sync within your OneSignal dashboard Data > Integrations > BigQuery.
View data in BigQuery
Whenever an event is generated, OneSignal automatically sends a copy of the event details to BigQuery.
Once that time has elapsed, navigate to your BigQuery instance and search for the newly created dataset.
BigQuery dataset
Events and properties
Message event kinds
Property: event_kind
Type: String
The kind of message and event (e.g. message.push.received
, message.push.sent
).
Message Event (OneSignal) | event_kind | Description |
---|---|---|
Push Sent | message.push.sent | Push notification successfully sent. |
Push Received | message.push.received | Delivered push (see Confirmed Delivery). |
Push Clicked | message.push.clicked | User clicked the push. |
Push Failed | message.push.failed | Delivery failure. See message reports. |
Push Unsubscribed | message.push.unsubscribed | User unsubscribed from push. |
In-App Impression | message.iam.displayed | In-App message shown. |
In-App Clicked | message.iam.clicked | In-App message clicked. |
In-App Page Viewed | message.iam.pagedisplayed | In-App page shown. |
Email Sent | message.email.sent | Email delivered. |
Email Received | message.email.received | Email accepted by recipient’s mail server. |
Email Opened | message.email.opened | Email opened. See Email Reports. |
Email Link Clicked | message.email.clicked | Link in email clicked. |
Email Unsubscribed | message.email.unsubscribed | Recipient unsubscribed. |
Email Marked Spam | message.email.resporedasspam | Marked as spam. See Email Deliverability. |
Email Bounced | message.email.hardbounced | Bounce due to permanent delivery failure. |
Email Failed | message.email.failed | Delivery failed. |
Email Suppressed | message.email.supressed | Suppressed due to suppression list. |
SMS Sent | message.sms.sent | SMS sent. |
SMS Delivered | message.sms.delivered | SMS successfully delivered. |
SMS Failed | message.sms.failed | SMS failed to deliver. |
SMS Undelivered | message.sms.undelivered | SMS rejected or unreachable. |
Event data schema
For each message event generated by a user, the following metadata will be attached to the record.
Column Name | Type | Description |
---|---|---|
event_id | UUID | Unique identifier for the event |
event_timestamp | Timestamp | Time of event occurrence |
event_kind | String | The Event Kind |
subscription_device_type | String | Device type (e.g., iOS, Android, Web, Email, SMS) |
language | String | Subscription language code |
version | String | Integration version |
device_os | String | Device operating system version |
device_type | Number | Numeric device type |
token | String | Push token, phone number, or email |
subscription_id | UUID | Subscription ID |
subscribed | Boolean | Subscription status |
onesignal_id | UUID | OneSignal user ID |
last_active | String | Last active timestamp |
sdk | String | OneSignal SDK version |
external_id | String | External user ID that should match the integration user ID |
app_id | UUID | App ID from OneSignal |
template_id | UUID | Template ID (if applicable) |
message_id | UUID | Message batch/request ID |
message_name | String | Name of the message |
message_title | String | Message title (English only) |
message_contents | String | Truncated message body (English only) |
_created , _id , _index , _fivetran_synced | Internal use | Fivetran sync metadata |
Notes
- Syncs after saving/activating may take an additional 15-30 minutes to complete.
- Deactivating may still result in one final sync after deactivation.
- To ensure efficient data synchronization in your BigQuery destination, our system automatically creates and manages staging datasets. These datasets, named with a pattern like
fivetran_{two random words}_staging
, temporarily store data during processing before it’s integrated into your main schema. These staging datasets are essential for maintaining a streamlined workflow and should not be deleted, as they will be automatically recreated.
FAQ
Why do I see different message IDs with the same content?
This happens when the same message is sent more than once, likely via a transactional flow or message template reused across multiple sends.