What Goes Up When the Rain Comes Down?
24 Feb 2016
So let’s start with a simple question... How is the weather today?
Why is the weather important?
Regardless of whether you believe you ‘care’ or not about the actual weather conditions, there is scientific evidence (Denissen et al., 2008) that there is a correlation between human mood and weather. A few examples of that correlation are that higher temperatures can raise someone from a low mood, not enough sun can make a low person feel even lower and conditions like extreme rain or heat can increase the level of aggression in someone – and we are not only talking about London’s cyclists.
On the other hand, based on consumer psychology studies we know that mood affects shopping behaviour and vice versa… remember what you bought the last time you got a promotion or how much you spent on Oxford Street when that stupid boyfriend/girlfriend cheated on you (aka Shopping Therapy).
You see where I am going, right? How powerful would it be if I know that because it was raining the whole day today, you bought that trip to Barcelona…! So on this blog we are going to explain how to add weather conditions (temperature, rainfall, etc.) as a custom dimension in Google Analytics and show the benefits of this.
In order to do that we need to bring weather into Google Analytics and this is how Ana did it:
The elements that you have to create are the following:
In GTM
- One Custom HTML tag for the JavaScript code
- Two Data Layer variables to store the weather conditions
- One Weather Custom Event trigger for the Event tag
- One 1st Party Cookie to see if the session is alive
- One Weather Event tag to send info to GA
In GA
- Two Custom Dimensions at session level
How does the magic happen?
The Custom HTML tag will check if the weather information has been sent in the past 30 minutes by checking the cookie. If the information has been sent, the custom HTML code will reset the cookie and nothing else.
If the weather information hasn't been sent, the HTML snippet will get the user location using their IP address and then it will make a call to the Weather API which will reply with the relevant weather information. Then this information will be pushed into the Data Layer.
The Custom Trigger will fire the Event tag as soon as the information is available in the Data Layer.
For more detailed instructions please visit Simo Ahava’s blog post; they are pretty easy to follow even if you’re not that technical.
How can we use this weather data?
We have plenty of clients for whom weather could be a useful factor: for example, websites selling flights or holidays, museums and art galleries, or fashion sites looking to understand how weather impacts the type of products bought. The following is an example custom report from one of our willing clients, a museum.
‘Great Angelos, I can see that poor weather conditions correlate with a better conversion rate for this specific booking. But what can I do with that? I am not God to change the weather for my marketing activities’ your cynical self may say.
Well my friend, you can do at least two things:
- Perform campaign management tasks based on weather information. Change your campaigns and adjust your bidding strategy based on the current weather conditions or forecast. More instructions here.
Which ad are you more likely to click through on a rainy Tuesday during your lunch break?
- Personalise your website based on each visitor’s local weather conditions with Optimizely.
Which landing page image would affect you more when looking for an Audi A3 on a sunny day?
The times when marketing activities and website design were one-size-fits all are long gone! If you want to join the pioneers' side give us a shout… Oh, and what goes up when the rain comes down? An umbrella!
To view this blog written by Angelos Alexelis on Periscopix's website, please click here
Please login to comment.
Comments