Google Analytics spatial data visualised with BigQuery and CARTO

,

Google Analytics is a staple component in most business intelligence team’s decision making processes. It provides insights about traffic sources to your website, tracks the success of your paid Ad campaigns and monitors the buyerā€™s purchasing behavior. 

However, despite the wonderful insights you can glean using Google Analytics, the location data attached to each prospect’s activity is generally underutilised and hidden beneath dashboards and reports. The ‘out of the box’ geovisualisation (pictured below) offered in Google Analytics leaves much to be desired with only a single map of the geographic spread of your website visitors.

Together with our partner Data Runs Deep and their client, Red Balloon, we set out to explore more advanced methods of visualising Google Analytics data while also incorporating additional product location data to enhance the analysis. In this blog we will cover the tools we used and our data processing methods prior to visualising the data in CARTO
 

Choosing the right tools for the job

The first phase of any project, be it large or small, is to evaluate the requirements, decide upon the right technology for the job and design a suitable solution. In this case, we were fortunate to have relatively loose output requirements meaning we could spend some time exploring our visualisation options. 

The two fixed requirements were that we had to access data from Google Analytics and improve upon the visualisation provided through that platform. 

The two key components of this task were a data warehouse and a visualisation tool. 

  • Google Cloud’s BigQuery was the data warehouse of choice, mostly for itā€™s rapid analytical ability on structured data and ease of integration with Google Analytics.
  • For a visualisation tool, CARTO is our go-to for spatial analysis and visualisation. The added bonus was that CARTO integrates directly with BigQuery via a CARTO connector. 

 

Getting the data ready

BigQuery is the key interlocker between Google Analytics and CARTO. If you’re using the standard Google Analytics platform, as we were, youā€™ll need to utilise the Google Analytics API to extract the website analytics information before ingesting it into BigQuery (special thanks to Ash from Data Runs Deep). If youā€™re a Google Analytics 360 user (Google’s advanced business analytics tool), your Google Analytics data is automatically ingested into BigQuery as a part of your subscription. 

With the data extracted from Google Analytics, we had a range of source files to be pushed into BigQuery. 

  • For large source files, we created BigQuery tables by linking to a Google Drive Uniform Resource Identifier (URI) of the raw data file. Alternatively, we could have uploaded to a Google Cloud Storage bucket and imported into BigQuery from there. 

Querying directly from the ā€˜linkedā€™ table (from Google Drive in CSV format) in BigQuery was found to be slower, so we opted to query the table first, then save the results as a materialised view. This means the data is stored directly in BigQuery and is query optimised. 

  • For smaller source files, BigQuery tables were directly uploaded from the local drive. 

new pic
 

Once the data is organised in BigQuery, it is then ready for spatial analysis. Using CARTO’s Google BigQuery connector, it is simple to connect to data stored in BigQuery, run queries against it and then visualise, perform spatial analyses and build applications with it in CARTO. The connector enables CARTO to utilise the power of BigQueryā€™s petabyte scale analysis capability.


 

What can we achieve?

There are an abundance of insights you can glean using GA data in CARTO, however, depending on what questions your business is trying to solve will determine what your output looks like.

Here is one example of a CARTO map utilising data from Google Analytics via BigQuery. The map shows product and purchase locations with the ability to filter by a range of parameters. 

unnamed-1

Liveli hosted a webinar showing what is possible when you bring your Google Analytics data into CARTO. 

The results shown in the webinar are beneficial to many industries including food delivery, retail, government and more. If youā€™re interested in seeing what the Google Analytics data looked like in CARTO – you can watch the webinar on the Liveli website.
 

Watch the full webinar

 

Related Articles

Here are more related articles you may be interested in.

Women in GIS at NGIS

Posted on
The geospatial industry has long been male-dominated, but women are making strides and shaping its future. At NGIS, women make up 43% of our team, demonstrating our commitment to diversity and inclusion. We are proud to celebrate the talented women at NGIS who are pushing boundaries, driving innovation, and inspiring the next generation.Ā  Ahead of International Womenā€™s Day, we spoke to four remarkable women in GIS about their journeys, challenges, and advice for those looking to enter the field. Hereā€™s what they had to say:
Read More Women in GIS at NGIS

Monitoring the disappearing underwater forest

Posted on
What if one of the most critical ecosystems in our oceans was vanishing before our eyes without us even noticing? 95% of Tasmania’s kelp forests have vanished. Along Australiaā€™s southern coastline, Giant Kelp forests, known for their towering underwater canopies and vital role in marine biodiversity, are quietly disappearing. NGIS is proud to be part…
Read More Monitoring the disappearing underwater forest

Launching a Sustainable Coffee Future

Posted on
During Climate Week 2024, a groundbreaking initiative was announced, uniting key global players to transform the coffee supply chain. The UNIDO Solutions Platform is a digital tool that helps coffee producers gain important insights into their supply chains. By using artificial intelligence (AI), the platform enables producers to understand the environmental impacts of their operations and adopt more sustainable practices. It specifically addresses the new and evolving regulatory requirements, providing data-driven solutions to create a sustainable and climate-resilient coffee supply chain for everyone involved.
Read More Launching a Sustainable Coffee Future

Empowering the Abu Dhabi Department of Municipalities and Transport in Traffic Monitoring and Flood Mitigation

Posted on
TraceMarkā„¢ Flow an NGIS Solution has helped the Abu Dhabi Department of Municipalities and Transport (DMT) in traffic monitoring and flood mitigation. During the heavy rain event in April 2024, TraceMarkā„¢ Flow proved instrumental in managing traffic disruptions and infrastructure challenges by providing real-time data and intuitive dashboards for swift, informed decision-making. Beyond traffic monitoring, TraceMarkā„¢…
Read More Empowering the Abu Dhabi Department of Municipalities and Transport in Traffic Monitoring and Flood Mitigation

TraceMark takes home the Transformative Solutions Award at The INCITE Awards

Posted on
We are pleased to announce that NGIS has won the Transformative Solutions Award for our TraceMarkā„¢ Sustainable Sourcing platform at this year’s INCITE Awards. Earlier this month, our team attended the awards ceremony at The Westin Perth. It was a wonderful evening, and a fantastic opportunity to meet so many West Australian innovators. This award…
Read More TraceMark takes home the Transformative Solutions Award at The INCITE Awards