BigQuery - Data Export

Connect your OneSignal Application to send data to BigQuery

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

Google Cloud Platform

  • Find a project or create a new one
  • Organization with Billing enabled
  • Ensure there’s an active billing account. If not, create one. It will require valid credit card information.
  • Make sure that the billing account is added to the project

BigQuery Account

  • You'll need an active BigQuery account
  • Credentials for your BigQuery account

OneSignal Account & Annual Plan

  • All OneSignal customers can try out this integration regardless of the plan they are on
  • Only customers on an Annual OneSignal plan can purchase the add-on for this integration

Setup

Step 1 - Create a Service Account

  1. Ensure the proper project is selected.
  2. Visit the Create Service Account page or from the Service Accounts page, click "+ Create Service Account." - Quick Link
  1. Fill out the fields. Give it any name and service account ID you choose.
  1. Give the service account the BigQuery User role.

Step 2 - 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 - Quick Link
  2. Select your BigQuery Service Account
  1. Under Keys, select Add Key → Create New Key → JSON
  1. The key will download, open the file

Example of the Service Account Key:

{
  "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"
}

Step 3 - Setup BigQuery Integration

  1. In OneSignal, navigate to Data > Integrations > BigQuery.
  2. Copy the configuration details from the Service Account Key JSON file you downloaded in the previous step.
    ℹ️ Note: The Service Account Key text input field requires the entire JSON content.
  1. OneSignal Settings
    1. Set up Sync Frequency, the most frequent setting is 15 minutes
    2. Dataset and Destination Table names will be pre set
      1. Dataset is named as onesignal_events_your-appid
      2. Destination Table is names as message_events
      3. you can update these names if you need to
    3. Select the events you care to receive in your BigQuery dataset. Feel free to select them all.

  1. Click “Save” and wait for the success confirmation

Step 4 - Send a Message

The hard part is over.

Now, we move on to the fun part: generating Message Events. You can send messages to any number of subscriptions using the channel of your choice.


Step 5 - Find Message Event Data In BigQuery

Whenever an event is generated, OneSignal automatically sends a copy of the event details to BigQuery.

ℹ️ Note: 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!


Events and Properties

Below is an overview of the data available for the BigQuery Data Export Integration. We will offer Message Event data in the beta, and will plan to offer more categories of event data and summary reports in the future.

For this integration, any event data generated by a user for the given OneSignal application will be exported to a customer's BigQuery project. Customers will not be able to select specific event kinds or filter the events they receive.

Message Event Kinds

Type: String

The type of message and event (e.g. message.push.received, message.push.sent).

Message Event Kind (OneSignal)Event name (in data set)Event Description
Push Sentmessage.push.sentPush notification successfully sent.
Push Receivedmessage.push receivedPush notification successfully received. See Confirmed Delivery .
Push Clickedmessage.push.clickedPush notification touched on device
Push Failedmessage.push.failedPush failed to be sent. Check the failed message report in OneSignal.
Push Unsubscribedmessage.push.unsubscribedThe Subscription unsubscribed from push.
In-App Impressionmessage.iam.displayedIn-App Message successfully displayed on device
In-App Clickedmessage.iam.clickedIn-App Message clicked on device
In-App Page Displayedmessage.iam.pagedisplayedIn-App Message page is displayed
Email Sentmessage.email.sentEmail successfully sent
Email Receivedmessage.email.receivedEmail received by recipient
Email Openedmessage.email.openedEmail opened by recipient. See Email Message Reports for details.
Email Link Clickedmessage.email.clickedEmail link clicked on
Email Unsubscribedmessage.email.unsubscribedEmail unsubscribed by recipient
Email Reported As Spammessage.email.resporedasspamEmail reported as spam by recipient. See Email deliverability for details.
Email Bouncedmessage.email.hardbouncedEmail returned to sender due to permanent error. See Email Message Reports for details.
Email Failedmessage.email.failedCould not deliver the email to the recipient’s inbox
Email Suppressedmessage.email.supressedThe email was not sent because the email address is on the Suppression list .
SMS Sentmessage.sms.sentSMS sent to recipient
SMS Failedmessage.sms.failedSMS failed to send
SMS Deliveredmessage.sms.deliveredSMS successfully delivered
SMS Undeliveredmessage.sms.undeliveredThe SMS could not be sent

Message Events Properties (columns)

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

Column NameTypeDescriptionExample
event_idUUID/StringA unique ID that represents the eventdc76df03-287c-403a-aabd-b2d4fe44e5c6
event_timestamptimestampThe time at which the event happened 2025-04-09 19:59:27.832 UTC
event_kindstringThe type of event that occurred. message.email.opened
subscription_device_typestringThe type of device this subscription uses.SMS
languagestringThe language of this subscriptionen
versionstringThe version of the integration 1.1.0
device_osstringThe device version that the user received the message on17.5.1
device_typenumericalThe type of device a user received the message on7
tokenstringThe push token (push), phone number(SMS) or email address (email) of the subscriptionpush32313097a54ac11169ea64dfa459937d2907d220201442b3fa1d02bf2dcef367
SMS 15857778888
Email [email protected]
subscription_idUUIDA unique ID that represents the device/subscription6e8b6978-75a4-4882-878c-2d15a78c2409
subscribedbooleanThe subscription status for the individual for the message they receivedTRUE
onesignal_idUUIDThe onesignal_id of the user that made the impressiondc76df03-287c-403a-aabd-b2d4fe44e5c6
last_activestringWhen the subscription for which the event is for was last active in the application 1712787115
sdkstringThe version of the OneSignal SDK in use where the message was received 50207
external_idstringThe external_id of the user that made the impressionMyExternalId
app_idUUIDA unique ID that represents the OneSignal App ID events were generated inbc76df03-287c-403a-aabd-b2d4fe44e5c6
template_idUUIDA unique ID that represents the template used to send a message via API or Journeysdc76df03-287c-403a-aabd-b2d4fe44e5c6
message_idUUIDA unique ID that represents the messagedc76df03-287c-403a-aabd-b2d4fe44e5c6
message_namestringThe human-readable id of the Notification/MessageCampaign 1
message_titlestringThe Title of the Notification/Message.
English only at this time
Bonus 50 coins when you play!
message_contentsstringThe Body of the message. (Truncated) English only at this time. Play against your friends and earn an additional...
_created
_id
_index
_fivetran_synced
Columns created by our syncing solution in every data set (Fivetran)

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.

Further Reading