Adding a Time Zone Filter in Google Data Studio

Heatmaps are a great way to visualize the time and day of the week for conversions on your website. It can help you plan out social posts, optimize bids on Google Ads, and schedule your email marketing campaigns.

However, for many companies that serve customers nationwide, the standard heatmap report in Google Data Studio could lead you to draw incorrect conclusions on when those conversions occur. Luckily, by adding a time zone filter to your reports, you can still gain accurate conversion insights to help you better understand your users.

How Time Is Reported in Google Analytics

Time reported in Google Analytics is based on the time zone you select in your property and view settings. That means that if your time zone in Google Analytics is set to Central Standard Time (CST) and a user converts in Seattle at 7:00 p.m. Pacific Time, your Google Analytics account will show a conversion at 9:00 p.m.

This large discrepancy between the time on the East Coast and the time on the West Coast is the reason why aggregating the hour of day metric within your reporting can lead to inaccurate assumptions about your target audience.

How To Set Up A Time Zone Filter in Google Data Studio

In order to set up time zones in Google Data Studio, you’ll need to set up a custom dimension within your Google Analytics data source. Once you’ve added the data source to your report, go to Resource > Manage Added Data Sources

Click “Edit” once your data source appears.

Then click “Add A Field”

Name your Field Name – I chose the name “Time Zone.” Then you’ll use a Case/When formula to categorize each metro in Google Analytics into a specific time zone.

To make it easy, you can copy and paste the code below:

CASE 
 WHEN REGEXP_MATCH(Metro, '.*(Anchorage AK|Fairbanks AK|Juneau AK).*') THEN 'Alaska Standard Time'
 WHEN REGEXP_MATCH(Metro, '.*(Dothan AL|Birmingham (.*) AL|Huntsville-Decatur (.*) AL|Montgomery-Selma, AL|Little Rock-Pine Bluff AR|Monroe LA-El Dorado AR|Ft. Smith-Fayetteville-Springdale-Rogers AR|Jonesboro AR|Panama City FL|Des Moines-Ames IA|Cedar Rapids-Waterloo-Iowa City & Dubuque IA|Sioux City IA|Rochester-Mason City-Austin,IA|Quincy IL-Hannibal MO-Keokuk IA|Chicago IL|Champaign & Springfield-Decatur IL|Peoria-Bloomington IL|Paducah KY-Cape Girardeau MO-Harrisburg-Mount Vernon IL|Davenport IA-Rock Island-Moline IL|Rockford IL|Shreveport LA|New Orleans LA|Lake Charles LA|Baton Rouge LA|Lafayette LA|Alexandria LA|Minneapolis-St. Paul MN|Mankato MN|St. Louis MO|Kansas City MO|Columbia-Jefferson City MO|Springfield MO|Ottumwa IA-Kirksville MO|St. Joseph MO|Jackson MS|Biloxi-Gulfport MS|Hattiesburg-Laurel MS|Columbus-Tupelo-West Point MS|Meridian MS|Greenwood-Greenville MS|Fargo-Valley City ND|Omaha NE|Lincoln & Hastings-Kearney NE|North Platte NE|Oklahoma City OK|Tulsa OK|Sherman-Ada, OK|Wichita Falls TX & Lawton OK|Memphis TN|Nashville TN|Houston TX|Dallas-Ft. Worth TX|Tyler-Longview(.*) TX|Austin TX|San Antonio TX|Harlingen-Weslaco-Brownsville-McAllen TX|Waco-Temple-Bryan TX|Lubbock TX|Corpus Christi TX|Laredo TX|Beaumont-Port Arthur TX|Amarillo TX|Abilene-Sweetwater TX|San Angelo TX|Victoria TX|Odessa-Midland TX|Milwaukee WI|Green Bay-Appleton WI|Madison WI|La Crosse-Eau Claire WI|Wausau-Rhinelander WI|Duluth MN-Superior WI|Joplin MO-Pittsburg KS|Topeka KS|Evansville IN|Wichita-Hutchinson KS|Minot-Bismarck-Dickinson(.*) ND|Jackson TN|Mobile AL-Pensacola (.*) FL|Bowling Green KY|Sioux Falls(.*) SD).*') THEN 'Central Standard Time'
 WHEN REGEXP_MATCH(Metro, '.*(Washington DC (.*)|Hartford & New Haven CT|Miami-Ft. Lauderdale FL|Tampa-St. Petersburg (.*) FL|Orlando-Daytona Beach-Melbourne FL|West Palm Beach-Ft. Pierce FL|Jacksonville FL|Ft. Myers-Naples FL|Gainesville FL|Atlanta GA|Macon GA|Savannah GA|Augusta GA|Columbus GA|Tallahassee FL-Thomasville GA|Albany GA|Indianapolis IN|South Bend-Elkhart IN|Louisville KY|Lexington KY|Providence-New Bedford,MA|Springfield-Holyoke MA|Baltimore MD|Salisbury MD|Portland-Auburn ME|Bangor ME|Presque Isle ME|Detroit MI|Lansing MI|Grand Rapids-Kalamazoo-Battle Creek MI|Charlotte NC|Greenville-New Bern-Washington NC|Raleigh-Durham (.*) NC|Greenville-Spartanburg-Asheville-Anderson|Greensboro-High Point-Winston Salem NC|Wilmington NC|Boston MA-Manchester NH|New York NY|Utica NY|Rochester NY|Albany-Schenectady-Troy NY|Buffalo NY|Syracuse NY|Burlington VT-Plattsburgh NY|Binghamton NY|Elmira (.*) NY|Watertown NY|Cleveland-Akron (.*) OH|Dayton OH|Cincinnati OH|Columbus OH|Toledo OH|Youngstown OH|Zanesville OH|Wheeling WV-Steubenville OH|Lima OH|Philadelphia PA|Harrisburg-Lancaster-Lebanon-York PA|Johnstown-Altoona-State College PA|Wilkes Barre-Scranton PA|Pittsburgh PA|Erie PA|Charleston SC|Florence-Myrtle Beach SC|Columbia SC|Knoxville TN|Richmond-Petersburg VA|Norfolk-Portsmouth-Newport News VA|Roanoke-Lynchburg VA|Charlottesville VA|Tri-Cities TN-VA|Harrisonburg VA|Charleston-Huntington WV|Clarksburg-Weston WV|Bluefield-Beckley-Oak Hill WV|Parkersburg WV|Ft. Wayne IN|Terre Haute IN|Marquette MI|Alpena MI|Chattanooga TN|Lafayette IN|Flint-Saginaw-Bay City MI|Traverse City-Cadillac MI).*') THEN 'Eastern Standard Time'
 WHEN REGEXP_MATCH(Metro, '.*(Honolulu HI).*') THEN 'Hawaii Standard Time'
 WHEN REGEXP_MATCH(Metro, '.*(Phoenix AZ|Denver CO|Grand Junction-Montrose CO|Colorado Springs-Pueblo CO|Boise ID|Missoula MT|Helena MT|Butte-Bozeman MT|Billings, MT|Great Falls MT|Glendive MT|Cheyenne WY-Scottsbluff NE|Albuquerque-Santa Fe NM|Rapid City SD|El Paso TX|Salt Lake City UT|Casper-Riverton WY|Tucson (.*) AZ|Idaho Falls-Pocatello ID|Twin Falls ID).*') THEN 'Mountain Standard Time'
 WHEN REGEXP_MATCH(Metro, '.*(Los Angeles CA|San Francisco-Oakland-San Jose CA|San Diego CA|Monterey-Salinas CA|Santa Barbara-Santa Maria-San Luis Obispo CA|Sacramento-Stockton-Modesto CA|Chico-Redding CA|Palm Springs CA|Fresno-Visalia CA|Yuma AZ-El Centro CA|Bakersfield CA|Eureka CA|Portland OR|Seattle-Tacoma WA|Spokane WA|Yakima-Pasco-Richland-Kennewick WA|Reno NV|Las Vegas NV|Eugene OR|Medford-Klamath Falls OR|Bend OR).*') THEN 'Pacific Standard Time'
 ELSE 'Not Set/Outside of US'
END

Once you’ve set up your calculated field, you’ll need to add a control drop down to your Data Studio Report.

Within the drop down settings, choose the custom dimension you created and then you’re all set!

Summary

Bad data leads to bad decisions. By adding a time zone filter to your Google Data Studio Reports, you can make better decisions by looking at your data with a more accurate lens.

Stay in the know with email updates!

* indicates required

Transforming Google Data Studio Reports: Using Conditional Formatting

One of the most difficult parts of creating digital marketing reports is effectively and efficiently communicating the results of your online efforts. To help you create more intuitive Google Data Studio reports, I have compiled three great suggestions for you to use. Since these posts are written in a longer “how-to” format, I have spliced them up into three different blogs, making them more digestible. This suggestion is all about using conditional formatting to focus your reader’s attention on specific attributes of your report.

When Conditional Formatting Can Provide Extra Value to Your Reports

Traditionally conditional formatting is used to highlight different thresholds in your reporting. For example, you could highlight in green landing pages that received more than 200 sessions in the past month and had a conversion rate greater than 5%. You could also highlight in red landing pages that had received more than 200 sessions in the past month and had a conversion rate of less than .25%.

You can even use conditional formatting in a less orthodox way, such as highlighting:

  1. Pages where you are performing A/B testing
  2. Pages with a certain version of your contact form
  3. Pages with that highlight a certain brand message
  4. Locations with more than four review stars on Google
  5. Blogs written by certain authors

How To Employ Conditional Formatting in Data Studio Reports

To add conditional formatting to your existing charts, mouse over the right hand side of your screen, where you can select the style tab.

Once you select “Add,” a bar will appear at the bottom giving you the option to create a rule. For a simple rule, select your condition and an input value, then click “Save.”

For a more complex rule, you’ll follow the same process, but the condition selected should be REGEX. If you are not familiar with regex, read my regex 101 blog. Although a much more manual process, it will help you highlight data that doesn’t fit within traditional threshold rules.

Summary

The easier you make it for people to read your reports, the quicker and more likely they are to understand your key takeaways. Highlighting aspects of your reports with conditional formatting will draw your reader’s attention to key takeaways in a visually stimulating way. For other ways to make your Data Studio reports more intuitive, read my other two blogs about cleaning up your URLs and renaming metrics and dimensions.

Transforming Google Data Studio Reports: Renaming Metrics & Dimensions

One of the most difficult parts of creating digital marketing reports is effectively and efficiently communicating the results of your online efforts. To help you create better Google Data Studio reports, I have compiled three great suggestions for you to use. Since these posts are written in a longer “how-to” format, I have spliced them up into three different blogs, making them more digestible. This suggestion is all about making your metric and dimension names more intuitive.

When Metric & Dimension Names Aren’t Intuitive In Your Reports

As you are building your Data Studio reports, you will notice that the names of your metrics and dimensions import as well (as they should). However, sometimes these names are too long or do not match your data after you have applied filters. As a result, you will want to change the names for your metrics and dimensions.

I first found this tip useful with my goal metrics. By default, Data Studio not only imports the goal name, but it also imports the goal number. As a result, instead of your goal reading simply, “Form Submissions,” you would have “Form Submissions (Goal 3 Completions).” To anyone who does not regularly use Google Analytics, this is not only completely irrelevant information, but it can also be confusing information.

Another time this would be helpful is if you have decided to take your Google Analytics reports to the next level and transform your URLs. One example I gave in my previous blog post is transforming your location URLs to match the standard naming conventions of your differing locations when you feature them in your report. For example, instead of having your location URL read “/locations/dallas-main-street/”, it could read “Store #152”.

If you do that, however, it may also be beneficial to change your metric name to “Locations.” This way it is easier for your team to more quickly understand the main takeaways, such as “Here are the main locations that people visited online” or “Here are the locations where the most amount of people filled out a contact form.”

How To Rename Metrics & Dimensions in Google Data Studio

The process of changing the names of your metrics and dimensions in Google Data Studio is quite simple. After you set up your data visualization in a scorecard, table, chart, or other format, mouse over your metrics and dimensions on the right-hand side. A pencil will appear over the “AUT” portion of your metric and the “ABC” portion of your dimension.

After that, fill in the “name” portion of the metric or dimension with the name of your choosing, and you are done!

Summary

The easier you make it for people to read your reports, the quicker and more likely they are to understand your key takeaways. Update your metric and dimension names so that they are shorter and easier to decipher for those outside of the digital marketing world. For other ways to make your Data Studio reports more intuitive, read my other two blogs about cleaning up your URLs and employing conditional formatting.

Transforming Google Data Studio Reports: Cleaning Up URLs

One of the most difficult parts of creating digital marketing reports is effectively and efficiently communicating the results of your online efforts. To help you create more intuitive Google Data Studio reports, I have compiled three great suggestions for you to use. Since these posts are written in a longer “how-to” format, I have spliced them up into three different blogs, making them more digestible. This suggestion is all about making your URLs easier to read and understand.

When URLs Aren’t Intuitive In Your Reports

In a perfect world, your URLs never change and they match your page title to a tee. Unfortunately, this perfect world is far, far away for many analytics practitioners. Furthermore, even when your URL meets both of these conditions, it can be hard to read for people who are not knee-deep in Google Analytics data every day. Below are common cases when you might need to give your URL a different name to make it easier to comprehend for report recipients:

  1. Your Homepage: Often your homepage URL is a simple forward slash. When not accompanied by the rest of your domain, it is less intuitive that the symbol “/” is the front page of your website. Make it easier for your reader by changing the name in your reports to “Homepage.”
  2. Your Location Pages: For multi-location businesses, interpreting URLs is not always impossible, rather it is just inconvenient. Try changing the page path “/locations/dallas-main-street” to “Dallas – Main Street Location.” Even better, stick to standard naming conventions used throughout the organization. For example, if the Dallas Main Street location is referred to as Store # 152, use that nomenclature in your reporting.
  3. Grouping Pages: Sometimes landing pages are more user-friendly without grouping them under a subfolder. For example, you may want to use the URL “example.com/50-percent-off” on your Google Ads campaigns instead of “example.com/landing-page/50-percent-off” to get a higher click-through rate. While this is a smart move by your PPC team, remembering all your landing page URLs when looking at a report can be a pain. Try adding a prefix in your reporting to add more clarity, such as “PPC Landing Page: 50% Off.”

How To Rename URLs In Data Studio

After you have added your data source (in this case, Google Analytics) into Google Data Studio, go to Resource > Manage Added Data Sources.

Click “Edit” once your data source appears.

Name your Field Name – I chose the name “Modified URL.” Then you will use a Case/When formula to categorize your URLs.

In the screenshot, I have given two types of REGEXP_MATCH formulas to produce our desired end result. The first one is

WHEN REGEXP_MATCH(Landing Page, "^/$") THEN "Homepage"

This formula will change the page path “/” to the word “Homepage.” If you are not familiar with regex and haven’t read my regex 101 post, the formula may seem like a foreign language. Translated, the formula says “Whenever you see a landing page that exactly matches ‘/’, make it say “Homepage” instead.

This formula will only work for those who have not prepended the hostname to the URL in Google Analytics. If you have prepended your hostname, make sure to add it in right after the caret.

The second formula is much more simple:

WHEN REGEXP_MATCH(Landing Page, '.*(/locations/dallas-main-street/).*') THEN "Dallas - Main Street"

Translated, this says “Whenever you see the URL ‘/locations/dallas-main-street/’, use ‘Dallas – Main Street’ instead. When you use this formula on your own data, replace my fake URL with the URL you want to use. Even though this formula uses regular expressions, you will notice there is no need for you to escape characters such as dashes or forward slashes in either one of these examples.

Note: If you have a question mark in your URL, you won’t be able to simply escape the character with a slash (\). To make this work, I’ve found you’ll need to instead put your question mark with brackets around it. For example, if my URL was /locations?dallas-main-street/ I would instead write /locations[?]dallas-main-street/

Lastly, make sure when you are transforming URLs that you end your formula with ELSE Landing Page, otherwise, URLs that do not fit into the specific cases you defined will not show up at all, leading to a lot of missing data.

Once you have finished writing your formulas, click Update and then Done!

Summary

The easier you make it for people to read your reports, the quicker and more likely they are to understand your key takeaways. Transform your URLs so that they can be comprehended quicker by those outside of the digital marketing world. For other ways to make your Data Studio reports more intuitive, read my other two blogs about changing your metric and dimension names and employing conditional formatting.