Download and test GTM4WP 2.0.0 beta2. Don’t wait for others to test it, they are waiting for you!

Skip to content
Facebook Twitter Github RSS
Google Tag Manager for WordPress
  • Home
  • FeaturesExpand
    • Basic features of GTM4WP

      You can use many post or page attribute in you Google Tag Manager setup even for custom post types and taxonomies.

      Basic data

      Page / post attributes

      Site search

      User data

      Multisite data

      3rd party data

      Browser attributes

      Device attributes

      Operating system attributes

      Weather conditions

  • SetupExpand
    • Setup advanced GTM4WP features

      Integrate your measurement with WooCommerce, setup Google Analytics 4, Google Ads remarketing or conversion tracking maximizing capabilities.

      WooCommerce related

      Google Analytics 4

      Google Ads – Dynamic Remarketing

      Google Ads – Conversion tracking

      Google Ads – Enhanced Conversions

      Other setup articles

      Cache Safe Data Layer

      Exclude WordPress admins

      Embedded media players

  • DevelopersExpand
    • Information for developers and WP managers

      There are several tools in GTM4WP to support your special needs and to adjust plugin behavior to your website or WooCommerce shop.

      Do you want to contribute with a bugfix or a new feature? Visit the GTM4WP’s GitHub page!

      For Developers

      Actions and filters

      WP themes + Proper ecommerce tracking

      For WP managers

      Setup GTM Environments

      Hard code GTM parameters

  • Blog
  • GDPR
Download
Google Tag Manager for WordPress
Home / Use special 3rd party data in Google Tag Manager / Track weather conditions around the current visitor

Track weather conditions around the current visitor

Weather tracking is not available from GTM4WP 2.0.0. The feature and all of its data layer variables were removed in that release. This page is kept for the sites that still run a legacy 1.x version and for anyone who needs to know what the variables used to hold.

When you upgrade to 2.0.0 the plugin deletes the stored weather options, including the saved OpenWeatherMap API key. No weather variable is written into the data layer any more, so a Google Tag Manager tag, trigger or variable that reads one of the names below stops receiving a value. Review your container and remove anything that depends on them.

  • Replacing the feature with server-side Google Tag Manager
  • How the feature worked in 1.x
  • weatherCategory
  • weatherDescription
  • weatherTemp
  • weatherPressure
  • weatherWindSpeed
  • weatherWindDeg

Replacing the feature with server-side Google Tag Manager

The plugin has no built-in replacement. If you run server-side Google Tag Manager, the Weather Variable community template by Stape calls the same OpenWeatherMap API that GTM4WP used and makes the values available in your server container. It returns the temperature, humidity, air pressure, wind speed, visibility or the full API response, and it has a unit system selector, so you can rebuild everything the variables below used to carry.

Two things work differently from the old plugin feature. The template runs in a server container, so it needs a server-side Google Tag Manager setup, and you enter your own OpenWeather API key on the variable, which keeps the key in the container instead of in your WordPress settings. The location normally comes from the city and country code you set on the variable. When the server container runs on Stape or on Google Cloud App Engine, the template reads the geo headers of the incoming request instead and reports the weather around the current visitor, which is the closest equivalent of what the plugin did.

How the feature worked in 1.x

GTM4WP loaded the weather conditions around the visitor from the OpenWeatherMap API and cached the result for one hour to keep the number of API calls down. It relied on the geo data feature to work out where the visitor was, so both had to be set up, each with an API key of its own, and both services could charge for the traffic a busy site generated. The geo data feature was removed in 2.0.0 as well and is described on the geo data page.

Because the IP address of the visitor was shared with those 3rd party services, a block_gtm4wp_geoip cookie set in the browser of the visitor switched the geo and weather lookups off for that person. Any of the values "yes", "true", "on" or "1" counted as a block. That cookie has no effect in 2.0.0, because neither lookup is made any more.

With both API keys set in the plugin options, the following data layer variables were available.

weatherCategory

Legacy 1.x variable. The group of weather parameters: Rain, Snow, Extreme, Clear, and so on.

weatherDescription

Legacy 1.x variable. The exact weather condition within the group, for example Sky is clear.

weatherTemp

Legacy 1.x variable. The current temperature around the visitor, as a float. A radio button in the plugin settings decided whether the number was reported in Celsius or in Fahrenheit.

weatherPressure

Legacy 1.x variable. The current air pressure around the visitor, as an integer.

weatherWindSpeed

Legacy 1.x variable. The current wind speed around the visitor, as a float.

weatherWindDeg

Legacy 1.x variable. The current wind direction around the visitor in degrees, as an integer.

© 2026 Google Tag Manager for WordPress - Privacy policy

  • WordPress.org plugin page
  • Plugin support
  • Plugin reviews
  • Home
  • Features
    • Basic features of GTM4WP

      You can use many post or page attribute in you Google Tag Manager setup even for custom post types and taxonomies.

      Basic data

      Page / post attributes

      Site search

      User data

      Multisite data

      3rd party data

      Browser attributes

      Device attributes

      Operating system attributes

      Weather conditions

  • Setup
    • Setup advanced GTM4WP features

      Integrate your measurement with WooCommerce, setup Google Analytics 4, Google Ads remarketing or conversion tracking maximizing capabilities.

      WooCommerce related

      Google Analytics 4

      Google Ads – Dynamic Remarketing

      Google Ads – Conversion tracking

      Google Ads – Enhanced Conversions

      Other setup articles

      Cache Safe Data Layer

      Exclude WordPress admins

      Embedded media players

  • Developers
    • Information for developers and WP managers

      There are several tools in GTM4WP to support your special needs and to adjust plugin behavior to your website or WooCommerce shop.

      Do you want to contribute with a bugfix or a new feature? Visit the GTM4WP’s GitHub page!

      For Developers

      Actions and filters

      WP themes + Proper ecommerce tracking

      For WP managers

      Setup GTM Environments

      Hard code GTM parameters

  • Blog
  • GDPR
Search