Merging Weather Data with Google Analytics


How does weather affect your website’s conversions?

Before you can answer this question, you're going to need some way of merging your Google Analytics with Weather data.

One way is to use JavaScript to make an external API call to a weather service as the page loads and send this to Analytics in the form of a custom dimension.

Here's Simo Ahava's blog on the subject:
https://www.simoahava.com/analytics/send-weather-data-to-google-analytics-in-gtm-v2/

As Simo points out, this is not an optimal solution - a couple of problems are API rate limits and the sheer inefficiency of a method that repeatedly polls the same API endpoint. Good luck if you have more than say 10K visits per day!

It would be much better if you could have your Google Analytics data in a convenient data-warehousing solution already joined with weather data without having to implement any Javascript... which is exactly what we do at Needl.

The big plus here is that you can get historic weather data joined with your historic analytics data.

  • weather.weatherCategory (e.g. Snow, Rain, Clear etc)
  • weather.weatherDescription (more detail for the category)
  • weather.sunrise (time at the nearest station)
  • weather.sunset
  • weather.temperature (edited)

See it in action

Example dataset in BigQuery:

https://console.cloud.google.com/bigquery?project=needlbq&p=needlbq&d=public&t=demo&page=table


Book a demo for free!