[UA] Localize your BigQuery Export in the EU [Legacy]

You are viewing a legacy article about Universal Analytics. Learn more about Google Analytics 4 replacing Universal Analytics.
This feature is only available in Analytics 360, part of Google Marketing Platform.
Learn more about Google Marketing Platform.

This article describes how to localize the data you export from Analytics to BigQuery within the European Union. Note that the procedures are different for new exports and for existing exports.

Localizing new exports
In this section:

Step 1: Create a Google Cloud Platform project and enable BigQuery

 

  1. Log in to the Google Cloud Platform Console.
  2. Create a Google Cloud Platform project.

    You can create a new project or select an existing project.
  3. Navigate to the APIs table.

    Open the Products & services menu in the top-left corner, click APIs & Services, then click Library.
  4. Activate BigQuery.

    Under Google Cloud APIs, click BigQuery API. On the following page, click Enable API.
  5. If prompted, review and agree to the Terms of Service.

Step 2: Prepare your project for BigQuery Export

 

  1. Ensure Billing is enabled for your project.

    If you do not have Billing enabled for your project, open the Products & services menu in the top-left corner, then click Billing.
  2. If prompted, create a billing account.

    A billing account is necessary to apply billing to a project. A single billing account may be shared across multiple projects. Follow the steps in the API console to create your billing account.
  3. Accept the free trial if it's available.

    If you are offered a free trial, it is safe to accept it; however, you must also enter billing details in order for BigQuery to continue receiving exported data once the free trial is over.
  4. Validate Billing enablement.

    Open your project at https://bigquery.cloud.google.com, and try to create a data set in the project. Click the blue arrow next to project name, then click Create data set. If you can create the data set, billing is setup correctly. If there are any errors, make sure billing is enabled.
  5. Add the service account to your project.

    Add [email protected] as a member of the project, and ensure that user role at the project level is set to either Data Owner or Job User. Having one of these roles is required in order to export data from Analytics to BigQuery. Learn more
  6. Redeem your coupon code.

    Go to cloud.google.com/redeem to redeem your rolling $500-per-month Analytics 360 credit for BigQuery. Your code will be included in an email from your Account Manager. This step is necessary in order to receive the $500-per-month Analytics 360 credit for BigQuery, and must be completed before the export is initiated.
    If you are prompted with an alert to create a new Billing account, then add your organization ID to the end of the URL (https://console.developers.google.com/billing/redeem?organizationId=your organization ID).

Step 3: Create an EU-localized dataset

 

  1. Open your project at https://bigquery.cloud.google.com, and Click Create new dataset.
  2. A panel opens in which you enter the necessary information to create your dataset.
    • Enter an ID for the dataset. The dataset ID must be the same as the Analytics View ID, which you can find in the universal picker in Analytics.
    • For Data location, select EU.
    • Set the data expiration you want.
      Select Never if you ever want to do historical analysis. Once data expires, it is permanently unavailable.
    • Click OK.

Step 4: Link BigQuery to Analytics 360

Proceed with linking as usual, and data will flow into the EU-localized dataset.

  1. Sign in to Google Analytics. Use an email address that has OWNER access to the BigQuery project, and also has Editor role for the Analytics property that includes the view you want to link.
  2. Click Admin, and navigate to the Analytics 360 property that contains the view you want to link.
  3. In the PROPERTY column, click All Products, then click Link BigQuery.
  4. Enter your BigQuery project number or ID. (Learn more about how to locate your project number and ID.)
  5. Select the view you want to link (the same view you identified in Step 3 above).
  6. Optional: Select the email addresses at which you would like to receive daily success and/or failure notifications.
  7. Optional: Select your current-day export preference. Note that the continuous export option uses the Cloud streaming service, which includes an additional $0.05 charge per GB sent.
  8. Confirm that you have enabled billing and applied any relevant credits or coupons to your project.
  9. Click Save.
  10. If you need to stop the export, return to this page, and click Adjust Link in the BigQuery section.
Localizing existing exports
In this section:
You can adapt these instructions to move historical data to other locations (e.g., from the U.S. to Asia or South America).

Step 1: Unlink and move data from existing US-localized dataset

In order to point the export to a new dataset, you need to remove the existing dataset from the project prior to reintegrating.

  1. Unlink your existing BigQuery Export:
    • Click ADMIN > PROPERTY column > PRODUCT LINKING > All Products.
    • Under BigQuery, click Adjust Link > Unlink.
  2. Move data from your existing dataset to a new location of a different name. You can use any existing process. The new dataset can exist within the same project, but must not have the same name as the existing export (you will reuse the existing name again for the new export).

Step 2: Back up your data, then delete existing US-localized dataset

  1. To protect your historical data, confirm that your dataset is backed up before completing the deletion process. Learn more about copying datasets.
  2. Open up your project at https://bigquery.cloud.google.com, and find the dataset in the left navigation.
  3. Click the actions menu for the dataset, then click Delete dataset.
Learn more about moving your historical data from one location to another (e.g., from the U.S. to the E.U.).

Step 3: Create a new EU-localized dataset of the same name

  1. Open your project at https://bigquery.cloud.google.com, and Click Create new dataset.
  2. A panel opens in which you enter the necessary information to create your dataset.
    • Enter an ID for the dataset. The dataset ID must be the same as the Analytics View ID, which you can find in the universal picker in Analytics.
    • For Data location, select EU.
    • Set the data expiration you want.
      Select Never if you ever want to do historical analysis. Once data expires, it is permanently unavailable.
    • Click OK.

Step 4: Relink BigQuery to Analytics 360

  1. Sign in to Google Analytics. Use an email address that has OWNER access to the BigQuery project, and also has the Editor role for the Analytics property that includes the view you want to link.
  2. Click Admin, and navigate to the property that contains the view you want to link.
  3. In the PROPERTY column, click All Products, then click Link BigQuery.
  4. Enter your BigQuery project number or ID. (Learn more about how to locate your project number and ID.)
  5. Select the view you want to link (the same view you identified in Step 3 above).
  6. Optional: Select the email addresses at which you would like to receive daily success and/or failure notifications.
  7. Optional: Select your current-day export preference. Note that the continuous export option uses the Cloud streaming service, which includes an additional $0.05 charge per GB sent.
  8. Confirm that you have enabled billing and applied any relevant credits or coupons to your project.
  9. Click Save.
  10. If you need to stop the export, return to this page, and click Adjust Link in the BigQuery section.

Analytics backfills data the first time you link a reporting view to BigQuery, but does not backfill data when you relink. Learn more about backfilling.

To maintain your historical data, you can move the backup you created in Step 2 of this procedure from the U.S. to the EU

Google Cloud documentation on Working with Datasets

Was this helpful?

How can we improve it?
true
Choose your own learning path

Check out google.com/analytics/learn, a new resource to help you get the most out of Google Analytics 4. The new website includes videos, articles, and guided flows, and provides links to the Google Analytics Discord, Blog, YouTube channel, and GitHub repository.

Start learning today!

Search
Clear search
Close search
Google apps
Main menu
10406711958512259065
true
Search Help Center
true
true
true
true
true
69256
true
false