Best day for sales
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
- Implement tracking code on your website.
Process
In this use case, you will go through the following steps:
- Create a metric that calculates the transactions.
- 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.
- 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.
-
Go to Analytics > Metrics > New metric.
-
Enter the name of the metric.
-
Leave the metric type at default (Simple metric).
-
As Aggregator, select Count.
-
Leave Event and Occurrence type at default.
-
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. -
Click + where.
-
From the dropdown list, select $source.
-
As the logical operator, select Not equal.
-
In the text field, enter
POS
.
Note: This is because transactions with thesource: POS
attribute are from cash registers in online stores. -
As the date range, select Lifetime.
-
Click Save.
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).
- Go to Analytics > Expression > New expression.
- Enter the name of the expression.
- Set the Expression for option to Event.
- From the dropdown list, select transaction.charge.
- Build the formula of the expression:
- On the dashboard, click Select.
- From the dropdown list, select Function > Day of week.
- In the brackets, click Select.
- From the dropdown list, select Event attribute.
- Click the Unnamed field.
- On the bottom of the screen, click Choose parameter.
- Click the Events tab.
- Click Specials.
- Select TIMESTAMP.
- Click Save.
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.
-
Go to Analytics > Expression > New expression.
-
Enter the name of the expression.
-
Set the Expression for option to Event.
-
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. -
Build the formula of the expression:
Explanation of the expression formulaThe 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
.
- If the value returned by the “Transaction Day” expression is
-
Click Save.
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.
- Go to Analytics > Reports > New report.
- Enter the name of the report.
- From the Choose metric dropdown list, select the metric you created at the beginning of the process.
- Leave Range at default (top 3).
- From the Choose dimension dropdown list, select Expressions.
- 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.
- Select the date range you want to analyze.
- Click Save.
- To see the results, click Preview.
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:
- Metric that counts offline transactions.
- Expression that returns the day of week a transaction was made.
- Expression that assigns the number of the day of the week to a specific day.
- Final report.
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.