Weather Variable for Google Tag Manager Server Side

Set up a Weather variable to monitor weather properties of a specific city across any analytics platform (like Google Analytics 4).

The variable operates with an OpenWeather API key, which you can obtain for free. The OpenWeather service, along with Weather variable, allows you to monitor the weather of a specified city efficiently.

Useful resources

Open Source

The Weather Variable for GTM Server is developed and maintained by the Stape Team under the Apache 2.0 license.

GTM Gallery Status

:green_circle: Listed
:green_circle: Listed

GitHub

:green_circle: Repository

stape-io/weather-variable — updated: view commit

  • Removed Logs Settings group and all related logging functionality from the template.tpl file.
  • Simplified weather data request to always make unauthenticated HTTP calls without logging or retry logic for redirects.
  • Updated geo info retrieval to return null for invalid city codes and simplified header fallback logic.
  • Refactored and consolidated URI encoding and request sending helper functions for cleaner code.

GTM Gallery Status

:green_circle: Listed

stape-io/weather-variable — updated: view commit

  • Expanded weather variable to return multiple weather data points including humidity and wind speed
  • Grouped API key, units, country code, and city into a single config group with improved help links
  • Added option to select specific weather data fields or return all data with a new return options group
  • Enhanced API response handling to support error messages and nested property retrieval
  • Added automatic detection support for country and city when using Stape or GCP App Engine Hosting

GTM Gallery Status

:green_circle: Listed