Best day for sales

Published November 10, 2021
Modules
Difficulty

You can extract the day of the week (name) out of the event time and use this to prepare a report that shows the occurrence of transactions for every day of the week. This way, you can assume which day of the week is the best day to sell online.

Prerequisites


Process


In this use case, you will go through the following steps:

  1. Create a metric that calculates the transactions.
  2. Create two expressions which counts the number of the week day when transaction was made and which return the name of the week day when the transaction was made.
  3. Create a report to put together the data you gathered in these analyses.

Create a metric


In this part of the process, create a metric that calculates the transactions.

  1. Go to Analytics > Metrics > New metric.

  2. Enter the name of the metric.

  3. Leave the metric type at default (Simple metric).

  4. As Aggregator, select Count.

  5. Leave Event and Occurrence type at default.

  6. From the Choose event dropdown list, select transaction.charge.

    Note: It’s a default event which is sent after a purchase to Synerise as a result of tracking code implementation on the website.

  7. Click + where.

  8. From the dropdown list, select $source.

  9. As the logical operator, select Not equal.

  10. In the text field, enter POS.

    Note: This is because transactions with the source: POS attribute are from cash registers in online stores.

  11. As the date range, select Lifetime.

  12. Click Save.

    Formula of the metric
    Formula of the metric

Create two expressions


In this step you have to create two expression which counts the number of the week day when transaction was made and which return the name of the week day when the transaction was made.

Return the number of the week day when transaction was made

In this part of the process, create an expression that extracts the number of the week day out of a timestamp of the transaction.charge event. The result of this expression will be a number from 1 to 7 (1 is Monday, 7 is Sunday).

  1. Go to Analytics > Expression > New expression.
  2. Enter the name of the expression.
  3. Set the Expression for option to Event.
  4. From the dropdown list, select transaction.charge.
  5. Build the formula of the expression:
    1. On the dashboard, click Select.
    2. From the dropdown list, select Function > Day of week.
    3. In the brackets, click Select.
    4. From the dropdown list, select Event attribute.
    5. Click the Unnamed field.
    6. On the bottom of the screen, click Choose parameter.
    7. Click the Events tab.
    8. Click Specials.
    9. Select TIMESTAMP.
  6. Click Save.
Formula of the expression
Formula of the expression
Tip: If you want to keep the days of the week in the form of a number, you can proceed to creating a report.

Return the name of the week day when the transaction was made

In this part of the process, create an expression that assigns the number of the day of the week to a specific day. The result of the expression returns the name of the day of the week.

  1. Go to Analytics > Expression > New expression.

  2. Enter the name of the expression.

  3. Set the Expression for option to Event.

  4. From the dropdown list, select transaction.charge.

    Note: It’s a default event which is sent after a purchase to Synerise as a result of tracking code implementation on the website.

  5. Build the formula of the expression:

    Explanation of the expression formula

    The expression processes the Transaction day expression you built before in the following way:

    • If the value returned by the “Transaction Day” expression is 1, return Monday,
    • If the value returned by the “Transaction Day” expression is 2, return Tuesday,
    • If the value returned by the “Transaction Day” expression is 3, return Wednesday,
    • If the value returned by the “Transaction Day” expression is 4, return Thursday,
    • If the value returned by the “Transaction Day” expression is 5, return Friday,
    • If the value returned by the “Transaction Day” expression is 6, return Saturday,
    • If the above condition is not met, return Sunday.

  6. Click Save.

    Formula of the expression
    Formula of the expression
    WARNING: The layout of the formula on the illustration was visually changed for the sake of clarity.

Create a report


You can use the expressions and the metric you created in report to put together the data you gathered in these analyses. The result of the metric will show you the top three days of the week with the highest number of transactions.

  1. Go to Analytics > Reports > New report.
  2. Enter the name of the report.
  3. From the Choose metric dropdown list, select the metric you created at the beginning of the process.
  4. Leave Range at default (top 3).
  5. From the Choose dimension dropdown list, select Expressions.
  6. Find the expression that returns the name of the week day when the transaction was made.
    • If you use the transaction day expression, the report displays a table with a week day in the form of a number (1-7) and the number of transactions made during the days.
  7. Select the date range you want to analyze.
    Configuration of the report
    Configuration of the report
  8. Click Save.
  9. To see the results, click Preview.
    Preview of the report
    Preview of the report

Check the use case set up on the Synerise Demo workspace


You can check all analyses created in this use case in our Synerise Demo workspace:

If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker