AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.4K members online now
2.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Weather & Holiday Calendar tied with a user session?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

To understand better engagemtn, has anyone setup a report like this:


Weather    Holidays             PageViews     Conversion Rate

Sunny        Valentines Day    400                    5%

 

 

I followed simohava blog post to send weather data to Google Analytics. I was thinking of taking the same approach where I have all the holidays in a country and on that day, I fire an event category called Holiday & Action would be the actual day (ex Valentines Day)... Has anyone did a report like this, and if yes, how?

 

I would love to hear your thoughts

Re: Weather & Holiday Calendar tied with a user session?

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

You need to develop own holiday API and use it instead of the weather API.

 

If you are targeting only a specific country, it may be hard-corded with custom JavaScript at GTM.


The following code is a Custom JavaScript function that returns the holiday name in Japan of the accessed date.

 

function () {
  var d = new Date();
  var date = [
    d.getFullYear(),
    ('0' + (d.getMonth() + 1)).slice(-2),
    ('0' + d.getDate()).slice(-2)
  ].join('-');

  switch(date) {
    case '2017-01-01': return '元日';
    case '2017-01-02': return '振替休日';
    case '2017-01-09': return '成人の日';
    case '2017-02-11': return '建国記念の日';
    case '2017-03-20': return '春分の日';
    case '2017-04-29': return '昭和の日';
    case '2017-05-03': return '憲法記念日';
    case '2017-05-04': return 'みどりの日';
    case '2017-05-05': return 'こどもの日';
    case '2017-07-17': return '海の日';
    case '2017-08-11': return '山の日';
    case '2017-09-18': return '敬老の日';
    case '2017-09-23': return '秋分の日';
    case '2017-10-09': return '体育の日';
    case '2017-11-03': return '文化の日';
    case '2017-11-23': return '勤労感謝の日';
    case '2017-12-23': return '天皇誕生日';
  }
  return undefined;
}

Weather & Holiday Calendar tied with a user session?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks for your reply! Yeah, I thought about this and it's for a specific country so Ill hardcode it and push it through GTM. Do you push the holiday as an event tied to a session? So basically a custom dimension called "Holiday" which will be pushed on a specific day as an event...does this make sense?