Google Analytics BigQuery Setup V2
Google Analytics BigQuery Setup V2
No part of this publication can be reproduced or transmitted in any form or by any means, mechanical or electronic
including photocopying and recording or by any information storage and retrieval system, without permission in
writing from the author (except by a reviewer, who may quote brief passages and/or show brief video clips in a
review).
Disclaimer: Great efforts have been made to ensure the accuracy, timeliness and completeness of the contents
(written text, graphics) provided in this book. However neither the author nor Optimize Smart make any guarantee
/warranty of accuracy, timeliness and completeness of the information provided in this book or any website this
book links out to. No warranty/guarantee may be created or extended by a sales representative or written sales
materials. Similarly neither the author nor Optimize Smart make any guarantee/warranty that the websites linked
to this book are free from viruses, adware or other malicious programs. Websites listed in this book may have
changed or disappeared between when this book was written and when it is read. Neither the author nor Optimize
Smart will be liable for any losses or damages (including but not limited to: commercial, special, incidental,
consequential damages) arising from the use of the contents in this book. This book is for information purposes
only. The advice and strategies contained herein may not be suitable for every situation. If professional assistance is
required, the services of a competent consultant/agency should be sought. The fact that an organization or website
is referred to in this book, as a citation and/or potential source of further information does not mean that the
author or Optimize Smart endorses the information the organization or website may provide and/or
recommendations it may make.
● Runs one of the most popular blogs in the world on digital analytics
Website: www.optimizesmart.com
Linkedin: https://www.linkedin.com/in/analyticsnerd
Facebook: https://www.facebook.com/optimizesmart
WHAT'S INSIDE: My step-by-step blueprint for generating record sales and ROI
by leveraging analytics data.
#2 Set Up Your Google Analytics 4 (GA4) Account Correctly And Fast (70 pages)
WHAT'S INSIDE: Learn to set up your GA4 account correctly and fast using this
62 points checklist.
FAQ: Do you show “How” to do each item on the checklist? If so, with
screenshots?
Yes. There are links to the articles with detailed step by step instructions.
WHAT'S INSIDE: My step-by-step blueprint for getting started with data layers.
Get the only ebook on GTM data layers ever published. Learn the JavaScript
behind it.
#5 Do you want better skills in digital analytics and marketing? If yes, then
register for the free training:
Introduction to BigQuery
Google BigQuery is one of the products of the Google Cloud Platform.
The big query is an enterprise-level data warehouse from Google which is used to
provide business intelligence in the form of reports and dashboards.
It is a data storage and management system which is used to bring data from
several data sources (like Google Analytics, Google Ads, Facebook etc) for the
purpose of reporting and analysis.
When you use BigQuery, you can manipulate Google Analytics data in a way that is
many times simply not possible by using the Google Analytics user interface.
For example, certain dimensions and metrics combinations can not be queried
together whether you use the Google Analytics user interface or Google Analytics
API. But BigQuery has no such limitations.
This is one of the biggest advantages of using BigQuery. It makes advanced data
segmentation and analysis possible.
#1 You need a good working knowledge of SQL so that you can query data in
BigQuery. This is the primary requirement.
#2 You need a Google Cloud Platform account with billing enabled. In order to
enable the billing, you would need a valid credit card.
Step-14: Set your account type, enter tax information, name, address and credit
card details and then click on the ‘START MY FREE TRIAL’ button:
Step-18: Name your dataset (say GA_data_set) and then click on the ‘Create
dataset’ button at the bottom:
You would now need to use a third-party solution for sending Google Analytics
data to BigQuery. This is going to cost you based on your account usage.
Regardless of how much it costs you, it would most likely still be cheaper than
paying $150k per year to Google for using the GA360 (which comes with the free
connection to BigQuery).
You can either search for such third-party solutions online or use the one that I
use which is ‘Supermetrics for BigQuery‘. They provide a free 14 days trial of their
solution. No credit card is required.
Step-21: Fill out the form and then click on the ‘Send’ button:
Step-25: Press the enter key and then click on ‘Google Analytics by Supermetrics’:
Step-29: Type a meaningful name for the ‘Transfer config name’ field:
Step-30: Keep the scheduling options (which specify when the transfer will run) to
‘Start now’ (unless you want to change it) and move on to the next step:
Step-32: Select the data set you created earlier from the drop-down menu:
Step-36: Click on the name of the Google account which is associated with both
your Google Analytics account and BigQuery project:
Step-38: Click on the name of the Google account which is associated with your
Google Analytics account:
You should now see the ‘Source Connected‘ message below ‘Third party
connection‘:
Through the ‘Run History’ section, you can monitor the current progress of all of
your data transfers.
When the data transfer is complete you see the message ‘The transfer run has
completed successfully:
This data set lists all the data tables automatically created by supermetrics:
At this point, you can query a particular set of data by clicking on the ‘Query Table’
button:
Follow the steps below to connect Google Analytics 4 with BigQuery and then
send the GA data to it:
Step-4: Name your new project and then click on the ‘Create’ button:
You will know that you are in the right project because the project name will
appear at the top of your screen:
Step-12: Select your data location and then click on the ‘Next’ button.
You have the option to select a specific data stream for which you will be
exporting the data to BigQuery. Just click on ‘Edit’ if you want to edit your data
streams:
Step-15: Select the frequency of your data import to BigQuery by selecting both
‘Daily’ and ‘Streaming’ settings and then click on the ‘Next’ button:
Step-16: Click on the ‘Submit’ button. You should now see a screen like the one
below:
Congratulations!
Step-20: Search for “Big Query” and then click on the ‘Big Query API’ button:
You should now see your new service account listed like the one below:
It usually takes around 24 hrs for your GA4 data to be available in your BigQuery
project.
Step-29: Navigate back to your BigQuery account and make sure that your project
used for collecting GA4 data is selected:
Property ID refers to your Analytics Property ID, which you can find in the
property settings for your GA4 property.
This data set contains the following two data tables which contain your GA4
data:
1. events_(<number of days>)
2. events_intraday_<current date>
I have seen a lot of issues from incorrect tracking code, selecting the wrong KPIs to
analyzing data without using custom reports or advanced segments.
And they seem to be making this mistake over and over again.
They give the credit for conversions to the last touchpoint (campaign, ad, search
term...).
They can’t help themselves because they believe that the Google Analytics reports
are ‘what you see is what you get’.
But they are actually ‘what you interpret is what you get’.
This has resulted in marketers making wrong business decisions and losing money.
All the data you see in Google Analytics reports today lies to you unless you
know exactly how to interpret it correctly.
All untagged or incorrectly tagged marketing campaigns from display ads to emails
could be reported as direct traffic by Google.
During an HTTP to HTTPS redirect (or vice versa) the referrer is not passed
because of security reasons.
So on the surface, it may look like that most people are visiting your website
directly but this is not usually the case.
But this analysis does not end here, because you are still not looking at the
complete picture.
They are generally exposed to multiple marketing channels ( display ads, social
media, paid search, organic search, referral websites, email etc) before they
access your website directly.
So if you are unaware of the role played by prior marketing channels, you will
credit conversions to the wrong marketing channels.
To get this type of understanding you need to understand and implement web
analytics.
But you learn data analysis and data interpretation from web analytics and not
from Google Analytics.
The direction in which your analysis will move will determine the direction in
which your marketing campaigns will move.
You get that direction from ‘web analytics’ and not from ‘Google Analytics’.
So, what I have done is put together some completely free training for you.
This training will teach you what digital analytics really is and how I have been
able to leverage it to generate floods of new sales and customers.
I will also show you how you can copy what I have done to get similar results.
Himanshu