How to add correct time zone to Klipfolio’s data source

As you already know, I’m big fan of Klipfolio business dashboard and their excellent support people. One day I noticed that all our klips containing data for today were still showing data for yesterday if looked the klips/dashboards before 7am in the morning. The data itself was always correct, but we just had to wait after 7am before the data was really updated. Let’s take example:

Let’s pretend it is 22nd of December and 6am and my dashboard looked like this:
Anttikoski.fi: 50 visits – today (21.12.2015)
So the data is correct, I really had 50 visits 21.12.2015, but it has been already 6 hours over 21.12 and I should see:
Anttikoski.fi: 2 visits – today (22.12.2015)
Yes, I always pull the date from the data source and that way I can be 100% confident that my data is updating. And after 7am the date and data was updated to 22.12.2015, so there was strange 7 hours delay.

I discussed with Klipfolio’s support and our initial though was that this has got something to do with Adobe Analytics (api) settings. However, we had correct setting for Adobe etc, so I was pretty sure that this had got something to do with Klipfolio’s settings. I googled around the topic, but it was really hard to find anyone else struggling with this matter. However, after a long search I found couple of cases that might be same kind of issues I was having:
https://klipfolio.uservoice.com/forums/111381-klipfolio-ideas/suggestions/4353425-add-timezone-setting-to-configuration
https://twitter.com/thekenjones/status/501139960393527299

Here is my code (one random example) how to pull data from Adobe Analytics API to Klipfolio:

{
"reportDescription":{
"reportSuiteID":"XXXXXXXXXXXXXX",
"dateFrom":"{date.add(-7).format()}",
"dateTo":"{date.today.format()}",
"dateGranularity":"day",
"metrics":[ {"id":"orders"},{"id":"visits"} ],
"locale":"en_US"}
}

So the “dateFrom” and “dateTo” are surely using Klipfolio’s formats and I was sure this has got something to do with Klipfolio. Klipfolio is using by default their own time zone to pull data even when our Adobe Analytics data is using other time zone. So there isn’t one setting to adjust time zone in Klipfolio, by default it uses EST time zone or something.

At the same time Klipfolio’s support was also investigating this issue and finally I got the right trick from the support and we can add time zone to the format too and that way we can add any time zone we want to pull the data. Here is link for other time zones etc: http://klipfolio.uservoice.com/knowledgebase/articles/49944-date-and-datevalue-functions

So the new time zone settings is this one:
date.tz(“eet”) and I use “eet” which means eastern european time, but you can change that to whatever. And here is my new final format to pull data with right time zones:

{
"reportDescription":{
"reportSuiteID":"XXXXXXXXXXXXXXXXXXX",
"dateFrom":"{date.tz("eet").add(-7).format()}",
"dateTo":"{date.tz("eet").today.format()}",
"dateGranularity":"day",
"metrics":[ {"id":"orders"},{"id":"visits"} ],
"locale":"en_US"}
}

And now my data sources are updating correctly after midnight, and now I can look my dashboards with the newest data after coming home from the bar around 4am. 😉

Wanted to share this little trick if somenone is still struggling with this one and I’m sure Klipfolio’s support is also aware of this little fix, but I guess this isn’t so common question than even they can’t remember this one in a second. But again they were able to solve my mystery, after a little pressure from me. 🙂

 

About Antti

Digital Analytics Manager specialized in Adobe Analytics, Online personalization, SEO, CRO...

Leave a Reply

Your email address will not be published. Required fields are marked *