Google Cloud Storage
Send your Attribution data to Google Cloud Storage for more detailed analysis
Attribution can deliver your data export to a Google Cloud Storage bucket, from where you load it into the database of your choice. What each table contains is on Data schema.

This article is for a Google Cloud admin or DevOpsThe steps grant a service account write access to one of your buckets. Make sure you understand each step before you run it.
Create a service account with access to the bucket
- Log in to the Google Cloud Console.
- Create a new service account in your project with the "Storage Insights Collector Service" role,
roles/storage.insightsCollectorService. - Create a key for the service account and download the JSON file.
- Create a bucket, or pick an existing one, in the same project. Keep it for this data alone.
- Add the service account to the bucket's policy with the "Storage Object User" role,
roles/storage.objectUser. See IAM roles for Cloud Storage for what the role grants.
Check the access
Confirm that the service account can upload to the bucket. In Cloud Shell:
$ gcloud auth activate-service-account --key-file=YOUR-SERVICE-ACCOUNT-KEY.json
Activated service account credentials for: [[email protected]]
$ gcloud projects list
PROJECT_ID: xxxx
NAME: xxxx
PROJECT_NUMBER: xxxx
$ echo "upload test" > test.txt
$ gcloud storage cp test.txt gs://YOUR-CLOUD-BUCKET/
Copying file://test.txt to gs://YOUR-CLOUD-BUCKET/test.txt
Completed files 1/1 | 12.0B/12.0B
$ gcloud storage cat gs://YOUR-CLOUD-BUCKET/test.txt
upload test
If the last command prints upload test, the permissions are right.
Set up the export
Open Settings → Data Export, choose Google Cloud Storage and enter:
- The bucket as a full URL with the
gs://prefix, for examplegs://my-attribution-export. - The contents of the service account's key file (JSON).
Save, and the first files land with the next daily run.
Updated 9 days ago
