This article includes answers to some common questions about the Google Analytics Website Performance Dashboard.
How do I add a custom date range?
You can add a custom date range to your dashboard by editing the date selector dropdown menus. Watch the video below for step-by-step instructions.
In this video I am going to show you how to add a custom date range to the Google Analytics Website Performance Dashboard.
First, we’ll cover adding a new rolling date period. For example: Last 60 days, Last 45 days or Last n days.
Second, we’ll cover how to add a new date period that is not a rolling window. For example: Last quarter, 2 Months ago, 2 Years ago
Before we get started, You’ll only need to make an update in this top Klip if you want to continue using the entire dashboard. However, if you are looking to modify a single Klip, drag it onto a new dashboard. You’ll see the date dropdown appear. Follow the same steps in this video but edit this Klip-specific dropdown instead.
Add a rolling date range
Let's get right into our first scenario.
Say you want to add the date period “Last 60 days”.
First: Edit the Klip and select the date dropdown. Navigate to the “Period Values” component. We’re going to add a new option here.
Add a new item to your ARRAY function. In this case I’m going to add “-60” into my formula.
Next, navigate to the “Period Labels” component and add the Label that will correspond to the period value you just added. It’s very important that the label correctly lines up with the value you just created. So if you put the Value in the third slot of the Array, the label should be in the third slot too.
Great! that’s it, you are done. Everything else will be handled automatically by the rest of the formulas.
Add another rolling date range
To add another rolling date range, simply repeat the steps to include another option in both arrays. If you want to change the order of these date ranges, just change the order they appear in this array. Just remember! You have to follow the same order in both Period Values and Period Labels.
Add static date ranges
Now, let’s look at how we would add date ranges that are NOT a rolling window.
Say you want to add the date period “Last quarter”.
Just like in our first scenario, you will need to add the period value and period label in your date dropdown. In this case, I am going to add “lastquarter” in the “Period Values” and “Period Labels”. I’ll double check that my new values are in the same spot for both arrays.
Here, things are a little bit different than in our first scenario.
After adding the values to our arrays, we’ll need to modify the formulas that are dependant on the variables used by the dropdowns. To be more specific, we will need to modify the formulas in the “Start Date, End Date, Previous Start Date and Previous End Date” components.
Let’s start by modifying the Start Date formula:
We will need to add our new date case into this Switch statement. We can copy the formula for a case that closely resembles what we are trying to achieve and modify it to fit our needs.
In this case, it is easy for me to copy the formula that is used for ‘Last month” and modify it to be last quarter.
So I’ve copied it, I am going to change the case label from “last month” to “last quarter” and I’m going to modify the last parameter in this formula from month to quarter.
We’ll need to do the same for the rest of the components. So let’s navigate to the End Date component. I will copy the formula used for the “lastmonth” case again and modify the same things I did before. *Copy the formula, change the case label and change the -1 to -2 as follows.*
Repeat this for the Previous Start Date and Previous End Date. In these two components, we’ll need to an IF statement in order to handle the Previous Period vs Previous Year logic. If our selection is previous period, we’ll subtract -2 quarters, otherwise we’ll subtract 5.
And we are done! Let’s save and exit. We’ll test that our changes work.
Today’s date is February 22nd, 2017. Which means that the dates for last quarter are “Oct 01, 2016” and “Dec 31, 2016. That’s Q4.
If I select previous period, my dates correctly show Q3.
If I select previous year, my dates correctly show Q4 of 2016.
And there you have it! This is how you add new date ranges in the Google Analytics Website Performance Dashboard.