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

      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

Google Tag Manager for WordPress can load the weather conditions around your site visitor using the OpenWeatherMap API. GTM4WP caches weather data for 1 hour to lower the need to access the API. You will also need to setup Geo data in order for weather data tracking to work. Depending on your website’s traffic, additional fees may apply at OpenWeatherMap and IP Stack.

You can place a cookie named block_gtm4wp_geoip into the browser of your visitor to prevent the GeoIP and through that the Weather API usage to be disabled in the browser for that particular user. This is useful as the IP address of your site visitor will be shared with those 3rd party services and it is a good practice to get consent from the user to do that. If the user denies the consent, create the block_gtm4wp_geoip cookie using any of the following values: "yes", "true", "on" or "1".

Once API keys have been set in GTM4WP plugin options (you can obtain the keys by registering for a free or paid plan at OpenWeatherMap and IP Stack), the following data layer variables will be available:

  • weatherCategory
  • weatherDescription
  • weatherTemp
  • weatherPressure
  • weatherWindSpeed
  • weatherWindDeg

weatherCategory

This will include the group of weather parameters: Rain, Snow, Extreme, Clear, etc.

weatherDescription

This will include the exact weather condition within the group: Sky is clear, etc.

weatherTemp

This will include a float number with the current temperature around the current visitor. To set whether to show this number in Celsius or Fahrenheit, go to the plugin settings and set the corresponding radio button.

weatherPressure

This will include an integer number with the current pressure around the current visitor.

weatherWindSpeed

This will include a float number with the current wind speed around the current visitor.

weatherWindDeg

This will include an integer number with the current wind direction in degrees around the current visitor.

© 2025 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

      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