back to catalog
OtherTML
works in free trial | Built on 8.1.0.cl

Google Analytics Get code

Code by ThoughtSpot

A set of ThoughtSpot visualizations based on Google Analytics data hosted in Snowflake.

Worksheets

  • AdWords
  • Demographic Audience
  • Geographic Audience
  • Page Behaviour
  • Site Statistics
  • Traffic Source

Liveboards included

  • Adwords
  • Traffic Sources
  • Geographic Location
  • Page Analytics
  • Site Statistics

Rate this code

Thank you for rating this code!

Installation instructions

Local environment configuration

This starter kit uses the Google analytics reporting API v4. Hello Analytics Reporting API V4. To get started, execute the following commands on your local environment.

setup virtual environment

sudo -s apt-get install python3-venv python3 -m venv analytics-quickstart

Activate virtual environment:

source analytics-quickstart/bin/activate

install google api packages

pip install --upgrade google-api-python-client pip install --upgrade oauth2client

Retrieve and prep your data

  • Use the HelloAnalytics.py Python Script to download your Google Analytics data to either your local machine or a staging machine.
  • Use the snowflake_ga.sql DDL script to create the necessary staging tables and flattening views in your Snowflake data warehouse.
  • Load your JSON data files into their respective Snowflake tables using your preferred loading method.

Connect ThoughtSpot

Log into your ThoughtSpot instance and create an Embrace connection to each of the five views that have flattened the JSON data into a relational table structure.

Import TML

Combine all Worksheet TML files into a ZIP file:

  • Manifest_liveboard.yaml
  • Adwords Analysis - Google.worksheet.tml
  • Demographic Audience Anal.worksheet.tml
  • Geographic Audience Analy.worksheet.tml
  • Page Behaviour Analysis-.worksheet.tml
  • Site Statistics Analysis.worksheet.tml
  • Traffic Source analysis-.worksheet.tml

Combine all liveboard TML files into a ZIP file:

  • Manifest_liveboard.yaml
  • Acquisition - Adwords.pinboard.tml
  • Acquisition - Traffic Sou.pinboard.tml
  • Audience - Geographic Loc.pinboard.tml
  • Behaviour - Site Statisti.pinboard.tml
  • Behaviour - Page Analytic.pinboard.tml

Import the zipped file for the worksheets and verify that it has all been imported without any errors. Import the zipped for the liveboards and verify that it has all been imported without any errors.

Included Liveboards

Adwords

Traffic Sources

Geographic Location

Page Analytics

Site Statistics

Get code