Weather Tag: Detect weather effects, analyze them and increase your ROI
Do my customers buy more when it rains or when the sun shines? In which weather conditions are they more active in my online store, which products are particularly weather-dependent and which are not at all?
It’s clear that the weather has a big influence on what I’m interested in or what I buy. But until now, it was quite complicated to detect weather effects in Google Analytics and do analyses. Why? Because weather data could not simply be matched with every user action and analyses were therefore only possible through a subsequent matching process.
This is now changing with the Weather Tag by METEONOMIQS. Simply integrate the tag via the Google Tag Manager and enrich the user interactions with the local weather conditions in the Google Analytics setup. This allows to quickly visualize and quantify weather effects in a standardized way.
Here we show how to implement the tag and what benefits the Weather Tag has for analysts and marketers from the e-commerce and travel sectors.
How weather analytics helps analysts and marketers
Which products do customers ask for in bad or good weather?
Does my online store have a weather-dependent product range? Fashion, food, sports, furniture, cars, gardening – many products react strongly to the weather. But at what point are customers interested in fall or winter fashion? Which indoor or outdoor products are particularly weather-sensitive?
Why did the key figures crash so badly last week?
Hardly any customers in the online store and of course the boss immediately wants to know why that is. Were there technical problems, were ads not displayed correctly, and is the weather perhaps to blame? Possibly, as last week it was consistently over 30 degrees and people preferred to be at the lake rather than shopping online.
What about hotel bookings on bad weather days?
A rainy fall weekend is coming up. Perfect weather not only for dreaming about a vacation on the home couch, but for actually clicking through the latest offers.
With the Weather Tag, you can easily verify how weather-dependent the product range and sales are, and whether the hypotheses are true that hotel bookings increase on rainy days and the store is empty because it’s too warm.
You can explain performance drops and peaks based on precise weather data and use the insights for your marketing campaigns. To stay with the examples from above:
If it turns out that interest in vacations increases on rainy days, it’s best to run more ads exactly then. The second case is similar. If customers prefer to be outdoors rather than online when the summer weather is really hot, it’s better to lower activities in order to save money.
Weather Tag: Step by step guide
Step 1: Registration on meteonomiqs.com
To use the Weather Tag first select an API package suitable for your needs here.
Step 2: Download the Weather Tag
Open your Google Tag Manager account, click on templates and select the Weather Tag from the Community Template Gallery. Add it to your workspace.
Step 3: Data Privacy Statement & CMP configuration
What we need consent for:
- We store a cookie (
_sessmetonmq) with value “true” for 30 minutes in order to send the request not more than once per 30 minutes to the meteonomiqs backend
- The request that is sent to the meteonomiqs backend includes the Google client id from the Google Analytics cookie
- From the request, the IP address is used to derive the location (latitude, longitude) for determining the weather at that location
- The Google client id together with the weather data is sent to Google analyics
- IP address and location are not stored for further processing, but can be logged for troubleshooting. Logs are kept up to 10 days
An easy way is to add wetter.com Gmbh (meteonomiqs is a brand of wetter.com GmbH) as non IAB Vendor to your CMP (TCF2.0).
- Description: The presumable location is determined based on your IP address. A weather query is then made with the location data. This weather data is transmitted to the website operator for analysis purposes. The IP address is stored in the logs to identify abuse for up to 10 days. No further processing takes place.
- Name of processing company: meteonomiqs.com / wetter.com GmbH
- Address of processing company: Reichenaustr. 19a, 78467 Konstanz
- Puposes: Weather analytics
- Data Collected: Location based on the IP address
- Technologies Used: Cookies
- Cookie URL: –
- Location of Processing: European Union
- Retention Period
- Cookie: 30 minutes
- IP address in the log files for 10 days – the location and weather data is transmitted to the customer system, no further storage takes place on our site.
- Policy of Procesor : Data privacy https://www.meteonomiqs.com/data-privacy/
- Data Protection Officer: email@example.com
- Storage information: Cookie (Maximum age of cookie storage: 30 minutes) is set through Weathertag but it is shown as a first Party. No Non-cookie storage
If you are using a CMP prior to TCF2.0 or some other consent solution, please include the above information in your privacy statement as needed.
Step 4: Configure Weather Tag
Create a new custom tag.
Name your tag (For example, ‘UA-Weather’) and fill out the following fields.
- API_KEY: Add the API key you have received during registration
- Cookie Name Website: _sessmetonmq (this is prefilled)
- Cookie Name Google Analytics: _ga (this is prefilled)
- Custom Dimensions: Create Custom dimensions with the same Weather parameter names (Weather Status, Temperature, Precipitation, Windchill) on your Google analytics property with ‘User’ scope. Provide the respective custom dimenion’s index on these fields.
You can assign multiple weather parameters to the same custom dimensions. In this case, the values will be separated by a pipe symbol
|. Weather parameters that are left blank will not be available in the session data later. Make sure you do not reuse the custom dimenion indexes.
Scroll down to the Advanced settings. Set the tag firing option to
Once per page.
Save the tag. Go to ‘Variables’ on your Tag manager account and create ‘Data Layer Variables’ for both Google Analytics and wetter.com from your CMP, if not created already.
In addition to that, create a ‘First Party Cookie Variable’ as shown below. Provide the cookie name as _ga.
Now, go back to the custom tag (UA-Weather) we created and add a trigger for checking the consents. Click on Triggering. Click on + at the top right corner to add a new trigger. Choose the custom event trigger.
Check consent for both Google Analytics & wetter.com using the variables we created above. In addition to that, check if the first party cookie variable has value on it. This condition ensures that the GA cookie is set before the weather tag is fired. By doing this, we reduce the risk of sending empty values to the meteonomiqs backend. Your trigger should look like below.
Note: If you don’t have CMP in place, the trigger for checking the consent can be ignored. Simply add this custom tag you have created (without any trigger) as a cleanup tag (Tag sequencing) on your website’s generic pageview tag as shown here. The tag sequencing will ensure the custom tag fires immediately after your pageview tag is fired.
Step 5: Check and test
Once the tag is configured and deployed, the custom dimenions of a user session data will contain the configured weather parameters!
You can now analyze how user behaviour is impacted by different weather conditions.
Here’s how the end result may look in Google Analytics: