Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Get more from Analytics 360 with BigQuery and the Google Cloud Platform

If you are using Google Analytics 360, you can get much more from your data by using BigQuery to get better insights, and the rest of the cloud to get recommendations and predictions via Machine Learning. This presentation provides an introduction to Google BigQuery, Google Dataproc, Google Tensorflow/ML, and DataStudio 360 in the context of your analytics.

Get more from Analytics 360 with BigQuery and the Google Cloud Platform

  1. 1. javier ramirez @supercoco9 Get more from Analytics with Google BigQuery and the Google Cloud Platform
  2. 2. founder of https://datawaki.com https://teowaki.com We help companies on big data, google analytics 360, and cloud. We can advise, train, optimise, code, or deploy solutions.
  3. 3. Script template for House MD: * Patient gets in (dying) * Dr launches hypothesis * They take metrics (using awesome technology) * New hypothesis after their insights * Conversion! She'll live
  4. 4. A doctor with a basic hypothesis without the technology to see beyond the obvious
  5. 5. We need better insights We already use Google Analytics
  6. 6. Isn't Google Analytics good enough?
  7. 7. Google Analytics is great but... Even premium accounts get sampled reports when there are too many data (and not all the reports can be unsampled).
  8. 8. Google Analytics is great but... If you need to manage advanced segments, and if you want to combine segments, it can get tricky. And even if now you can get down to user level, it is really designed to show you aggregated data.
  9. 9. Google Analytics is great but... It's not easy to cross data in Analytics with data from other sources (CRM, invoicing system...) You can use Data Import, but there are many constraints to what you can do with it
  10. 10. Google Analytics is great but... Good for knowing what's happening in your application, but difficult for: * business intelligence/big data (data mining, finding patterns...) * machine learning (classify information, predict future trends...)
  11. 11. image from http://www.asphaltandrubber.com/ What if Google gave me access to my whole raw data
  12. 12. bigdata is cool but... expensive cluster hard to set up and monitor not interactive enough
  13. 13. What if I could... ..query billions of rows in seconds.. ..using a SQL-like web interface.. ..on a fully managed cloud.. ..paying only when I use it?
  14. 14. Designed to run analytics over huge volumes of raw data, and to integrate with other data sources https://cloud.google.com/products/bigquery/ Google BigQuery
  15. 15. Google Analytics 360 users get free daily exports from GA to BigQuery. Google BigQuery + GA 360
  16. 16. All your raw data. Unsampled. Use it however you want. BOOM! Google BigQuery + GA 360
  17. 17. integrating with external data sources * Export from any source * Import into BigQuery
  18. 18. happier than a baby panda on a rocking horse
  19. 19. data schema
  20. 20. it's just SQL
  21. 21. SELECT trafficSource.source, SUM( totals.transactions ) AS total_transactions FROM [123456789.ga_sessions_20161001] GROUP BY trafficSource.source ORDER BY total_transactions; basic queries (metric/dimension) SELECT device.deviceCategory, SUM ( totals.pageviews ) AS total_pageviews FROM [123456789.ga_sessions_20161001] GROUP BY device.deviceCategory ORDER BY total_pageviews;
  22. 22. SELECT IF(DOMAIN(trafficSource.source) is null, 'n/a', DOMAIN(trafficSource.source)) AS normalized_source, SUM ( totals.transactions ) AS total_transactions FROM [123456789.ga_sessions_20161001] GROUP BY normalized_source ORDER BY total_transactions; basic queries with a twist
  23. 23. 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 [123456789.ga_sessions_20161001] WHERE totals.visits>0 AND totals.transactions>=1 AND totals.transactionRevenue IS NOT NULL GROUP BY visitorId ) ; Average amount spent per visit
  24. 24. 2 segments, combined
  25. 25. SELECT fullvisitorID, visitID, visitNumber, hits.page.pagePath FROM [123456789.ga_sessions_20161001] where hits.type='PAGE' order by fullvisitorID, visitID, hits.hitnumber asc Identify user path/user actions
  26. 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. 27. SELECT hits.item.productName AS other_purchased_products, COUNT(hits.item.productName) AS quantity FROM [123456789.ga_sessions_20161001] WHERE fullVisitorId IN ( SELECT fullVisitorId FROM [123456789.ga_sessions_20161001] 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; Users who bought product A, also bought product B * example query from the BigQuery Cookbook for Google Analytics 360 https://support.google.com/analytics/answer/4419694?hl=en&ref_topic=3416089
  28. 28. 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
  29. 29. Machine learni... Hipster!
  30. 30. ML with Google Dataproc
  31. 31. ML with Google ML (Tensorflow)
  32. 32. * prediction example from the Google cloud, big data, and machine learning blog https://cloud.google.com/blog/big-data/2016/05/ ML with Google ML (Tensorflow)
  33. 33. * prediction example from the Google cloud, big data, and machine learning blog https://cloud.google.com/blog/big-data/2016/05/
  34. 34. * prediction example from the Google cloud, big data, and machine learning blog https://cloud.google.com/blog/big-data/2016/05/
  35. 35. * prediction example from the Google cloud, big data, and machine learning blog https://cloud.google.com/blog/big-data/2016/05/
  36. 36. try it out at http://bit.ly/datastudio (login with a bigquery-enabled account required)
  37. 37. GA 360 users get a monthly $500 credit to use BigQuery Storage costs $0.02 per GB/month ($0.01 for data older than 90 days) Querying costs $5 per TB. With the 1st TB free every month For power-users BigQuery just released a query flat-rate
  38. 38. What if I don't have a GA 360 account?
  39. 39. 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/BigQuery at the same time you send it to GA
  40. 40. Ready toReady to dive intodive into your GAyour GA data?data?
  41. 41. Need help with your data? https://teowaki.com Thanks! Javier Ramirez @supercoco9

×