Skip to main content
All CollectionsCustom FeaturesCustom Dimensions
How can I group date ranges in Polar?
How can I group date ranges in Polar?

This article details how you can leverage Custom Dimensions to group together certain date ranges to identify trends based on seasonality.

Abby Garland avatar
Written by Abby Garland
Updated over a week ago

Depending on how you run advertising or promotional campaigns, you may wish to group together certain specific date ranges and run analytics on your store's performance throughout those times. In addition, grouping date ranges together (based on promo periods, for example) gives you the flexibility to compare performance of different periods to each other.

The most common use cases for doing this in Polar Analytics are to:

  • Compare performance of various campaigns based on the dates they were live

  • Identify trends in sales, sessions, or conversions during different promotional periods

  • Assigning names to certain date ranges when particular campaigns or promos ran

How-To: Group Date Ranges using Custom Dimensions

Step 1: Create a Custom Dimension to group your date ranges.

You can launch the Custom Dimension builder here.

Step 2: In your "When" statement, add the rules for how you'd like to group your date ranges.

  • First, you'll need to add the dimension by which you'd like to group your date ranges. The dimension you add must correspond with the source of the types of metrics you'll use this breakdown to analyze. For example, if you're hoping to run analytics on Shopify data such as Total Sales, you'll want to add a Shopify dimension (for example, "Date" or "Processed Date" from the Shopify source). Alternatively, if you're hoping to run analytics on Google Analytics data such as Sessions, you'll want to add a Google Analytics dimension (for example, "Date" from the Google Analytics source).

  • Next, choose "is after" and enter the day before the first date that you'd like to be included in this date range, in the format YYYY-MM-DD. Then, add an additional "And" statement within your "When" statement and repeat the process, selecting "is before" and adding the day after the last date that you'd like to be included in this date range.

    In the example below, we're grouping all days between January 1st, 2023 through January 9th, 2023. We're using "Date" from Google Analytics, as we'll use this breakdown to analyze Sessions data.

Step 3: Use your "Then" and "Else" statements to define how you'd like to name this date range, and any other date ranges that don't meet your "When" statement rules.

In this example, we're naming this date range "New Year's Ad", and naming all other dates that fall outside of this range "No Ad". Keep in mind that you can always add additional "When" blocks within the Custom Dimension to name additional date ranges.

Step 4: Save your Custom Dimension and apply it in a Custom Report.

Once you've saved the dimension, you can pull any metric (that's available for the source you added in your Custom Dimension) into a Custom Report and apply the breakdown you just created.

Examples:

Dimension setup for grouping Google Analytics dates:

Dimension setup for grouping Shopify dates:

Did this answer your question?