SlideShare a Scribd company logo
1 of 32
Download to read offline
Get more from 
Analytics with 
Google BigQuery 
javier ramirez 
@supercoco9
about me 
19 years working on software: banking, e-commerce, 
government, CMS, start-ups... 
founder of 
https://datawaki.com 
https://teowaki.com 
https://teowaki.com/services 
Google Developer Expert on 
the Cloud Platform 
datawaki 
mail: j@teowaki.com twitter: @supercoco9
BigQuery 
is awes.. 
I use Google 
Analytics 
javier ramirez @supercoco9 https://teowaki.com
Isn't Google Analytics 
good enough? 
javier ramirez @supercoco9 https://teowaki.com
Google Analytics is great but... 
It lets you access aggregated data and sampled 
reports, not individual sessions/visits data. 
Even premium accounts get sampled reports when 
there are too many data (and not all the reports can 
be unsampled). 
javier ramirez @supercoco9 https://teowaki.com
Google Analytics is great but... 
If you need to manage many different segments, and 
if you want to combine segments, it can get tricky. 
Moreover, you can only segment or create reports 
using the pre-defined filters, which might or not be 
enough for you*. 
*even if segments have experienced a huge 
improvement with Universal Analytics 
javier ramirez @supercoco9 https://teowaki.com
Google Analytics is great but... 
It's not easy to cross data in Analytics with data from 
other sources (CRM, invoicing system...) 
Now you can use Import Data from Universal 
Analytics, but there are many constraints to what 
you can do 
javier ramirez @supercoco9 https://teowaki.com
Google Analytics is great but... 
Good for knowing what's happening in your 
application, but difficult for: 
* business intelligence/big data (data mining, 
find patterns...) 
* machine learning (classify information, 
predict future trends...) 
javier ramirez @supercoco9 https://teowaki.com
Google BigQuery 
Designed to run analytics 
over huge volumes of raw 
data, and to integrate 
with other data sources 
javier ramirez @supercoco9 https://teowaki.com
one 
more 
thing
Google BigQuery + GA Premium 
Google Analytics Premium 
users get free daily 
exports from GA to 
BigQuery. 
javier ramirez @supercoco9 https://teowaki.com
Google BigQuery + GA Premium 
All your raw data. 
Unsampled. 
Use it however you want. 
BOOM! 
javier ramirez @supercoco9 https://teowaki.com
o'reilly
khan academy
it's just SQL 
javier ramirez @supercoco9 https://teowaki.com
SQL is not very hard 
Give me the count of visitors from our analytics who 
visited yesterday using a mobile device, by 
country 
SELECT count(fullVisitorId) 
from ga_sessions_20141203 
where device.isMobile = true 
GROUP BY geoNetwork.country
data 
schema 
javier ramirez @supercoco9 https://teowaki.com
basic queries (metric/dimension) 
SELECT trafficSource.source, SUM( totals.transactions ) AS total_transactions 
FROM playground.ga_sessions_20140621 
GROUP BY trafficSource.source 
ORDER BY total_transactions; 
SELECT device.isMobile, SUM ( totals.pageviews ) AS total_pageviews 
FROM playground.ga_sessions_20140621 
GROUP BY device.isMobile 
ORDER BY total_pageviews;
basic queries 
with a twist 
SELECT 
IF(DOMAIN(trafficSource.source) is null, 
trafficSource.source, 
DOMAIN(trafficSource.source)) 
AS normalized_source, 
SUM ( totals.transactions ) AS total_transactions 
FROM playground.ga_sessions_20140621 
GROUP BY normalized_source 
ORDER BY total_transactions;
Average amount spent per visit 
SELECT ( SUM(total_transactionrevenue_per_user) / SUM(total_visits_per_user) ) 
AS avg_revenue_by_user_per_visit 
FROM ( 
SELECT SUM(totals.visits) AS total_visits_per_user, 
SUM( totals.transactionRevenue ) AS total_transactionrevenue_per_user, 
visitorId 
FROM playground.ga_sessions_20140621 
WHERE totals.visits>0 
AND totals.transactions>=1 
AND totals.transactionRevenue IS NOT NULL 
GROUP BY visitorId ) ;
2 segments, combined
Users who bought product A, 
also bought product B 
SELECT hits.item.productName AS other_purchased_products, 
COUNT(hits.item.productName) AS quantity 
FROM playground.ga_sessions_20140621 
WHERE fullVisitorId IN ( 
SELECT fullVisitorId 
FROM playground.ga_sessions_20140621 
WHERE hits.item.productName CONTAINS 'Light Helmet' 
AND totals.transactions>=1 
GROUP BY fullVisitorId ) 
AND hits.item.productName IS NOT NULL 
AND hits.item.productName !='Light Helmet' 
GROUP BY other_purchased_products 
ORDER BY quantity DESC;
SELECT prod_name, count(*) as transactions 
FROM 
( 
SELECT fullVisitorId, min(date) AS date, visitId, 
hits.item.productName as prod_name 
FROM ( 
SELECT fullVisitorId, date, visitId, 
totals.transactions, 
hits.item.productName FROM 
(TABLE_DATE_RANGE([dataset.ga_sessions_], 
TIMESTAMP('2014-06-01'), 
TIMESTAMP('2014-06-14'))) 
) 
WHERE fullVisitorId IN 
( 
SELECT fullVisitorId 
FROM (TABLE_DATE_RANGE([dataset.ga_sessions_], 
TIMESTAMP('2014-06-01'), 
TIMESTAMP('2014-06-14'))) 
GROUP BY fullVisitorId 
HAVING SUM(totals.transactions) > 1 
) 
AND hits.item.productName IS NOT NULL 
GROUP BY fullVisitorId, visitId, prod_name ORDER BY 
fullVisitorId DESC 
) 
GROUP BY prod_name ORDER BY transactions DESC; 
* example query from the lunametrics blog. Check them out for more awesomeness 
Products that 
are purchased 
and lead to 
other products 
being purchased
Identify user path/user actions 
SELECT fullvisitorID, visitID, visitNumber, hits.page.pagePath 
FROM playground.ga_sessions_20140621 
where hits.type='PAGE' 
order by fullvisitorID, visitID, hits.hitnumber asc
individual users data is awesome 
Cross CRM data with individual users actions to see 
how your response to incidents affect your users. 
Use the “frequently bought together” query and find 
users who didn't buy the related products. Send an 
e-mail campaign with an offer for those products.
integrating with external 
data sources 
* Connectors/REST API 
* Export into GCS 
* Import into BigQuery 
javier ramirez @supercoco9 https://teowaki.com
What if I don't have 
a GA Premium 
Account?
just send your own data 
define a data structure that fits your needs 
(or replicate the one GA provides), use a JS 
snippet to send data to your server, then 
to BigQuery** 
..you will miss many of the GA dimensions, but 
you can keep using GA and use BigQuery 
only for your unsampled data 
datawaki ** If you want to do this without managing 
your own servers, we can help you 
javier ramirez @supercoco9 https://teowaki.com
BigQuery pricing 
$20 per stored TB 
A site with 50m pageviews, would pay less 
than $10 a month per every 6 months worth 
of data 
$5 per processed TB 
*the 1st TB every month is free of charge 
** GA premium get $500 free credit monthly 
javier ramirez @supercoco9 https://teowaki.com
for GA premium users 
BigQuery is effectively 
for free 
*unless you upload huge external data or make 
huge queries 
javier ramirez @supercoco9 https://teowaki.com
Want to know more? 
https://cloud.google.com/products/bigquery/ 
https://datawaki.com 
Need help? 
https://teowaki.com/services 
Thanks! 
Javier Ramírez 
@supercoco9

More Related Content

What's hot

What's hot (8)

Google Analytics Data Mining with R
Google Analytics Data Mining with RGoogle Analytics Data Mining with R
Google Analytics Data Mining with R
 
Google Analytics 4 Trial Recommendation
Google Analytics 4 Trial RecommendationGoogle Analytics 4 Trial Recommendation
Google Analytics 4 Trial Recommendation
 
Benefits of Google Tag Manager
Benefits of Google Tag ManagerBenefits of Google Tag Manager
Benefits of Google Tag Manager
 
Space Data Strategy
Space Data StrategySpace Data Strategy
Space Data Strategy
 
Design Thinking for Data Superwomen & Supermen
Design Thinking for Data Superwomen & SupermenDesign Thinking for Data Superwomen & Supermen
Design Thinking for Data Superwomen & Supermen
 
Unlock your Big Data with Analytics and BI on Office 365
Unlock your Big Data with Analytics and BI on Office 365Unlock your Big Data with Analytics and BI on Office 365
Unlock your Big Data with Analytics and BI on Office 365
 
Snowplow at DA Hub emerging technology showcase
Snowplow at DA Hub emerging technology showcaseSnowplow at DA Hub emerging technology showcase
Snowplow at DA Hub emerging technology showcase
 
Clustrix Infographic
Clustrix InfographicClustrix Infographic
Clustrix Infographic
 

Viewers also liked

Viewers also liked (11)

Web Optimization Process Management
Web Optimization Process ManagementWeb Optimization Process Management
Web Optimization Process Management
 
BigQuery for the Big Data win
BigQuery for the Big Data winBigQuery for the Big Data win
BigQuery for the Big Data win
 
A Process for Being Data Driven
A Process for Being Data DrivenA Process for Being Data Driven
A Process for Being Data Driven
 
Should Digital Analysts Become More Data Science-y?
Should Digital Analysts Become More Data Science-y?Should Digital Analysts Become More Data Science-y?
Should Digital Analysts Become More Data Science-y?
 
Google BigQuery
Google BigQueryGoogle BigQuery
Google BigQuery
 
Google BigQuery for Everyday Developer
Google BigQuery for Everyday DeveloperGoogle BigQuery for Everyday Developer
Google BigQuery for Everyday Developer
 
Exploring BigData with Google BigQuery
Exploring BigData with Google BigQueryExploring BigData with Google BigQuery
Exploring BigData with Google BigQuery
 
Google BigQuery 101 & What’s New
Google BigQuery 101 & What’s NewGoogle BigQuery 101 & What’s New
Google BigQuery 101 & What’s New
 
AWS Athena vs. Google BigQuery for interactive SQL Queries
AWS Athena vs. Google BigQuery for interactive SQL QueriesAWS Athena vs. Google BigQuery for interactive SQL Queries
AWS Athena vs. Google BigQuery for interactive SQL Queries
 
Big Query Basics
Big Query BasicsBig Query Basics
Big Query Basics
 
Google Cloud Dataflow
Google Cloud DataflowGoogle Cloud Dataflow
Google Cloud Dataflow
 

Similar to Google Analytics and BigQuery, by Javier Ramirez, from datawaki

Similar to Google Analytics and BigQuery, by Javier Ramirez, from datawaki (20)

Google Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
Google Analytics with an Intro to Google Tag Manager for Austin WordPress MeetupGoogle Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
Google Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
 
Ga premium bigquery-integration
Ga premium bigquery-integrationGa premium bigquery-integration
Ga premium bigquery-integration
 
Big query the first step - (MOSG)
Big query the first step - (MOSG)Big query the first step - (MOSG)
Big query the first step - (MOSG)
 
Usando metodologías ágiles en UX
Usando metodologías ágiles en UX Usando metodologías ágiles en UX
Usando metodologías ágiles en UX
 
Track Report & Optimize Your Web Creations
Track Report & Optimize Your Web CreationsTrack Report & Optimize Your Web Creations
Track Report & Optimize Your Web Creations
 
Top 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerTop 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag Manager
 
MOOCS.pptx
MOOCS.pptxMOOCS.pptx
MOOCS.pptx
 
Google Analytics 4 and BigQuery: The New Kids On The Block.pptx
Google Analytics 4 and BigQuery: The New Kids On The Block.pptxGoogle Analytics 4 and BigQuery: The New Kids On The Block.pptx
Google Analytics 4 and BigQuery: The New Kids On The Block.pptx
 
Ai based analytics in the cloud
Ai based analytics in the cloudAi based analytics in the cloud
Ai based analytics in the cloud
 
Florian Pertynski session at Google Partner Summit Review
Florian Pertynski session at Google Partner Summit Review Florian Pertynski session at Google Partner Summit Review
Florian Pertynski session at Google Partner Summit Review
 
ga4.pdf
ga4.pdfga4.pdf
ga4.pdf
 
ga4.pdf
ga4.pdfga4.pdf
ga4.pdf
 
Google analytics
Google analyticsGoogle analytics
Google analytics
 
Turbocharging Google Analytics
Turbocharging Google AnalyticsTurbocharging Google Analytics
Turbocharging Google Analytics
 
CEO & Co-Founder - Steve Krull, Be Found Online
CEO & Co-Founder - Steve Krull, Be Found OnlineCEO & Co-Founder - Steve Krull, Be Found Online
CEO & Co-Founder - Steve Krull, Be Found Online
 
danmcclary-pspresentation-katieboyle-171030115522.pdf
danmcclary-pspresentation-katieboyle-171030115522.pdfdanmcclary-pspresentation-katieboyle-171030115522.pdf
danmcclary-pspresentation-katieboyle-171030115522.pdf
 
Why Big and Small Data Is Important by Google's Product Manager
Why Big and Small Data Is Important by Google's Product ManagerWhy Big and Small Data Is Important by Google's Product Manager
Why Big and Small Data Is Important by Google's Product Manager
 
Topic 6- SEO and Analytics .ppt
Topic 6- SEO and Analytics  .pptTopic 6- SEO and Analytics  .ppt
Topic 6- SEO and Analytics .ppt
 
Google Analytics Training Seminar - Vorian Agency
Google Analytics Training Seminar - Vorian AgencyGoogle Analytics Training Seminar - Vorian Agency
Google Analytics Training Seminar - Vorian Agency
 
Why Big Query is so Powerful - Trusted Conf
Why Big Query is so Powerful - Trusted ConfWhy Big Query is so Powerful - Trusted Conf
Why Big Query is so Powerful - Trusted Conf
 

More from javier ramirez

More from javier ramirez (20)

¿Se puede vivir del open source? T3chfest
¿Se puede vivir del open source? T3chfest¿Se puede vivir del open source? T3chfest
¿Se puede vivir del open source? T3chfest
 
QuestDB: The building blocks of a fast open-source time-series database
QuestDB: The building blocks of a fast open-source time-series databaseQuestDB: The building blocks of a fast open-source time-series database
QuestDB: The building blocks of a fast open-source time-series database
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
 
Deduplicating and analysing time-series data with Apache Beam and QuestDB
Deduplicating and analysing time-series data with Apache Beam and QuestDBDeduplicating and analysing time-series data with Apache Beam and QuestDB
Deduplicating and analysing time-series data with Apache Beam and QuestDB
 
Your Database Cannot Do this (well)
Your Database Cannot Do this (well)Your Database Cannot Do this (well)
Your Database Cannot Do this (well)
 
Your Timestamps Deserve Better than a Generic Database
Your Timestamps Deserve Better than a Generic DatabaseYour Timestamps Deserve Better than a Generic Database
Your Timestamps Deserve Better than a Generic Database
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
 
QuestDB-Community-Call-20220728
QuestDB-Community-Call-20220728QuestDB-Community-Call-20220728
QuestDB-Community-Call-20220728
 
Processing and analysing streaming data with Python. Pycon Italy 2022
Processing and analysing streaming  data with Python. Pycon Italy 2022Processing and analysing streaming  data with Python. Pycon Italy 2022
Processing and analysing streaming data with Python. Pycon Italy 2022
 
QuestDB: ingesting a million time series per second on a single instance. Big...
QuestDB: ingesting a million time series per second on a single instance. Big...QuestDB: ingesting a million time series per second on a single instance. Big...
QuestDB: ingesting a million time series per second on a single instance. Big...
 
Servicios e infraestructura de AWS y la próxima región en Aragón
Servicios e infraestructura de AWS y la próxima región en AragónServicios e infraestructura de AWS y la próxima región en Aragón
Servicios e infraestructura de AWS y la próxima región en Aragón
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverless
 
How AWS is reinventing the cloud
How AWS is reinventing the cloudHow AWS is reinventing the cloud
How AWS is reinventing the cloud
 
Analitica de datos en tiempo real con Apache Flink y Apache BEAM
Analitica de datos en tiempo real con Apache Flink y Apache BEAMAnalitica de datos en tiempo real con Apache Flink y Apache BEAM
Analitica de datos en tiempo real con Apache Flink y Apache BEAM
 
Getting started with streaming analytics
Getting started with streaming analyticsGetting started with streaming analytics
Getting started with streaming analytics
 
Getting started with streaming analytics: Setting up a pipeline
Getting started with streaming analytics: Setting up a pipelineGetting started with streaming analytics: Setting up a pipeline
Getting started with streaming analytics: Setting up a pipeline
 
Getting started with streaming analytics: Deep Dive
Getting started with streaming analytics: Deep DiveGetting started with streaming analytics: Deep Dive
Getting started with streaming analytics: Deep Dive
 
Getting started with streaming analytics: streaming basics (1 of 3)
Getting started with streaming analytics: streaming basics (1 of 3)Getting started with streaming analytics: streaming basics (1 of 3)
Getting started with streaming analytics: streaming basics (1 of 3)
 
Monitorización de seguridad y detección de amenazas con AWS
Monitorización de seguridad y detección de amenazas con AWSMonitorización de seguridad y detección de amenazas con AWS
Monitorización de seguridad y detección de amenazas con AWS
 

Recently uploaded

Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
Health
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
ranjankumarbehera14
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
SayantanBiswas37
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 

Recently uploaded (20)

Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 

Google Analytics and BigQuery, by Javier Ramirez, from datawaki

  • 1. Get more from Analytics with Google BigQuery javier ramirez @supercoco9
  • 2. about me 19 years working on software: banking, e-commerce, government, CMS, start-ups... founder of https://datawaki.com https://teowaki.com https://teowaki.com/services Google Developer Expert on the Cloud Platform datawaki mail: j@teowaki.com twitter: @supercoco9
  • 3. BigQuery is awes.. I use Google Analytics javier ramirez @supercoco9 https://teowaki.com
  • 4. Isn't Google Analytics good enough? javier ramirez @supercoco9 https://teowaki.com
  • 5. Google Analytics is great but... It lets you access aggregated data and sampled reports, not individual sessions/visits data. Even premium accounts get sampled reports when there are too many data (and not all the reports can be unsampled). javier ramirez @supercoco9 https://teowaki.com
  • 6. Google Analytics is great but... If you need to manage many different segments, and if you want to combine segments, it can get tricky. Moreover, you can only segment or create reports using the pre-defined filters, which might or not be enough for you*. *even if segments have experienced a huge improvement with Universal Analytics javier ramirez @supercoco9 https://teowaki.com
  • 7. Google Analytics is great but... It's not easy to cross data in Analytics with data from other sources (CRM, invoicing system...) Now you can use Import Data from Universal Analytics, but there are many constraints to what you can do javier ramirez @supercoco9 https://teowaki.com
  • 8. Google Analytics is great but... Good for knowing what's happening in your application, but difficult for: * business intelligence/big data (data mining, find patterns...) * machine learning (classify information, predict future trends...) javier ramirez @supercoco9 https://teowaki.com
  • 9. Google BigQuery Designed to run analytics over huge volumes of raw data, and to integrate with other data sources javier ramirez @supercoco9 https://teowaki.com
  • 11. Google BigQuery + GA Premium Google Analytics Premium users get free daily exports from GA to BigQuery. javier ramirez @supercoco9 https://teowaki.com
  • 12. Google BigQuery + GA Premium All your raw data. Unsampled. Use it however you want. BOOM! javier ramirez @supercoco9 https://teowaki.com
  • 15.
  • 16. it's just SQL javier ramirez @supercoco9 https://teowaki.com
  • 17. SQL is not very hard Give me the count of visitors from our analytics who visited yesterday using a mobile device, by country SELECT count(fullVisitorId) from ga_sessions_20141203 where device.isMobile = true GROUP BY geoNetwork.country
  • 18. data schema javier ramirez @supercoco9 https://teowaki.com
  • 19. basic queries (metric/dimension) SELECT trafficSource.source, SUM( totals.transactions ) AS total_transactions FROM playground.ga_sessions_20140621 GROUP BY trafficSource.source ORDER BY total_transactions; SELECT device.isMobile, SUM ( totals.pageviews ) AS total_pageviews FROM playground.ga_sessions_20140621 GROUP BY device.isMobile ORDER BY total_pageviews;
  • 20. basic queries with a twist SELECT IF(DOMAIN(trafficSource.source) is null, trafficSource.source, DOMAIN(trafficSource.source)) AS normalized_source, SUM ( totals.transactions ) AS total_transactions FROM playground.ga_sessions_20140621 GROUP BY normalized_source ORDER BY total_transactions;
  • 21. Average amount spent per visit SELECT ( SUM(total_transactionrevenue_per_user) / SUM(total_visits_per_user) ) AS avg_revenue_by_user_per_visit FROM ( SELECT SUM(totals.visits) AS total_visits_per_user, SUM( totals.transactionRevenue ) AS total_transactionrevenue_per_user, visitorId FROM playground.ga_sessions_20140621 WHERE totals.visits>0 AND totals.transactions>=1 AND totals.transactionRevenue IS NOT NULL GROUP BY visitorId ) ;
  • 23. Users who bought product A, also bought product B SELECT hits.item.productName AS other_purchased_products, COUNT(hits.item.productName) AS quantity FROM playground.ga_sessions_20140621 WHERE fullVisitorId IN ( SELECT fullVisitorId FROM playground.ga_sessions_20140621 WHERE hits.item.productName CONTAINS 'Light Helmet' AND totals.transactions>=1 GROUP BY fullVisitorId ) AND hits.item.productName IS NOT NULL AND hits.item.productName !='Light Helmet' GROUP BY other_purchased_products ORDER BY quantity DESC;
  • 24. SELECT prod_name, count(*) as transactions FROM ( SELECT fullVisitorId, min(date) AS date, visitId, hits.item.productName as prod_name FROM ( SELECT fullVisitorId, date, visitId, totals.transactions, hits.item.productName FROM (TABLE_DATE_RANGE([dataset.ga_sessions_], TIMESTAMP('2014-06-01'), TIMESTAMP('2014-06-14'))) ) WHERE fullVisitorId IN ( SELECT fullVisitorId FROM (TABLE_DATE_RANGE([dataset.ga_sessions_], TIMESTAMP('2014-06-01'), TIMESTAMP('2014-06-14'))) GROUP BY fullVisitorId HAVING SUM(totals.transactions) > 1 ) AND hits.item.productName IS NOT NULL GROUP BY fullVisitorId, visitId, prod_name ORDER BY fullVisitorId DESC ) GROUP BY prod_name ORDER BY transactions DESC; * example query from the lunametrics blog. Check them out for more awesomeness Products that are purchased and lead to other products being purchased
  • 25. Identify user path/user actions SELECT fullvisitorID, visitID, visitNumber, hits.page.pagePath FROM playground.ga_sessions_20140621 where hits.type='PAGE' order by fullvisitorID, visitID, hits.hitnumber asc
  • 26. individual users data is awesome Cross CRM data with individual users actions to see how your response to incidents affect your users. Use the “frequently bought together” query and find users who didn't buy the related products. Send an e-mail campaign with an offer for those products.
  • 27. integrating with external data sources * Connectors/REST API * Export into GCS * Import into BigQuery javier ramirez @supercoco9 https://teowaki.com
  • 28. What if I don't have a GA Premium Account?
  • 29. just send your own data define a data structure that fits your needs (or replicate the one GA provides), use a JS snippet to send data to your server, then to BigQuery** ..you will miss many of the GA dimensions, but you can keep using GA and use BigQuery only for your unsampled data datawaki ** If you want to do this without managing your own servers, we can help you javier ramirez @supercoco9 https://teowaki.com
  • 30. BigQuery pricing $20 per stored TB A site with 50m pageviews, would pay less than $10 a month per every 6 months worth of data $5 per processed TB *the 1st TB every month is free of charge ** GA premium get $500 free credit monthly javier ramirez @supercoco9 https://teowaki.com
  • 31. for GA premium users BigQuery is effectively for free *unless you upload huge external data or make huge queries javier ramirez @supercoco9 https://teowaki.com
  • 32. Want to know more? https://cloud.google.com/products/bigquery/ https://datawaki.com Need help? https://teowaki.com/services Thanks! Javier Ramírez @supercoco9