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

BigQuery

  • Active BigQuery account
  • Credentials for your BigQuery account

Setup

Create a service account

1

Log in to your Google Cloud Platform account

After you login, ensure the proper project is selected.

2

Create a service account

Visit the Create Service Account page and click Create Service Account.

3

Fill out the fields.

Give it any name and service account ID you choose.

4

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.

1

Navigate to Service Accounts in the GPC Dashboard

2

Select your BigQuery Service Account

Service Accounts page

3

Under Keys, select Add Key → Create New Key → JSON

Service Account Keys

4

Download and open the file

Example of the Service Account Key:

JSON
{
  "type": "service_account",
  "project_id": "random-project-12345",
  "private_key_id": "abcdefg",
  "private_key": "********",
  "client_email": "[email protected]",
  "client_id": "12345678",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/name%40project.iam.gserviceaccount.com"
}

Connect OneSignal

1

Activate the integration

In OneSignal, navigate to Data > Integrations > BigQuery

2

Enter the details

Copy the configuration details from the Service Account Key JSON file you downloaded in the previous step

The Service Account Key text input field requires the entire JSON content.

3

Configure the integration

  • Sync Frequency: as often as every 15 minutes
  • Dataset/Table Names: pre-set as onesignal_events_<app-id> and message_events (editable)
  • Event Types: choose which to sync—select all or just what you need
4

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.

5

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.

After saving/activating the BigQuery integration, you might see a delay of 15-30 minutes for the initial setup.

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_kindDescription
Push Sentmessage.push.sentPush notification successfully sent.
Push Receivedmessage.push.receivedDelivered push (see Confirmed Delivery).
Push Clickedmessage.push.clickedUser clicked the push.
Push Failedmessage.push.failedDelivery failure. See message reports.
Push Unsubscribedmessage.push.unsubscribedUser unsubscribed from push.
In-App Impressionmessage.iam.displayedIn-App message shown.
In-App Clickedmessage.iam.clickedIn-App message clicked.
In-App Page Viewedmessage.iam.pagedisplayedIn-App page shown.
Email Sentmessage.email.sentEmail delivered.
Email Receivedmessage.email.receivedEmail accepted by recipient’s mail server.
Email Openedmessage.email.openedEmail opened. See Email Reports.
Email Link Clickedmessage.email.clickedLink in email clicked.
Email Unsubscribedmessage.email.unsubscribedRecipient unsubscribed.
Email Marked Spammessage.email.resporedasspamMarked as spam. See Email Deliverability.
Email Bouncedmessage.email.hardbouncedBounce due to permanent delivery failure.
Email Failedmessage.email.failedDelivery failed.
Email Suppressedmessage.email.supressedSuppressed due to suppression list.
SMS Sentmessage.sms.sentSMS sent.
SMS Deliveredmessage.sms.deliveredSMS successfully delivered.
SMS Failedmessage.sms.failedSMS failed to deliver.
SMS Undeliveredmessage.sms.undeliveredSMS rejected or unreachable.

Event data schema

For each message event generated by a user, the following metadata will be attached to the record.

Column NameTypeDescription
event_idUUIDUnique identifier for the event
event_timestampTimestampTime of event occurrence
event_kindStringThe Event Kind
subscription_device_typeStringDevice type (e.g., iOS, Android, Web, Email, SMS)
languageStringSubscription language code
versionStringIntegration version
device_osStringDevice operating system version
device_typeNumberNumeric device type
tokenStringPush token, phone number, or email
subscription_idUUIDSubscription ID
subscribedBooleanSubscription status
onesignal_idUUIDOneSignal user ID
last_activeStringLast active timestamp
sdkStringOneSignal SDK version
external_idStringExternal user ID that should match the integration user ID
app_idUUIDApp ID from OneSignal
template_idUUIDTemplate ID (if applicable)
message_idUUIDMessage batch/request ID
message_nameStringName of the message
message_titleStringMessage title (English only)
message_contentsStringTruncated message body (English only)
_created, _id, _index, _fivetran_syncedInternal useFivetran 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.


Further reading