Average number of transactions per month
In this scenario, you will create sample segmentation that allows you to divide your clients into segments based on their average number of transactions per month. You may use that information further for targeted communication with promotions for a specific group.
Prerequisites
- Add a tracking code to your website.
- Become familiar with aggregates and expressions.
Process
- Create aggregates.
- Create expression.
- Create segmentation.
Create aggregates
In the first part of the process, create two aggregates which will be used later for creating expressions:
- An aggregate that counts a total number of transactions a customer made
- An aggregate that returns the timestamp of the first transaction a customer made
Total number of transactions for a customer
- Go to Analytics > Aggregates > Create aggregate.
- As the aggregate type, select Profile.
- Enter the name of the aggregate, for example
Total number of transactions
. - Set Analyze profiles by to Count.
- From the Choose event dropdown list, select transaction.charge
- In the date picker, select Lifetime.
- Save the aggregate.
Timestamp of the first customer’s transaction
- Go to Analytics > Aggregates > Create aggregate.
- As the aggregate type, select Profile.
- Enter the name of the aggregate, for example
Timestamp of first transaction
. - Set Analyze profiles by to First.
- From the Choose event dropdown list, select transaction.charge.
- As the event parameter, select TIMESTAMP.
- In the date picker, select Lifetime.
- Save the aggregate.
Create expressions
In the next part of the process, create 4 expressions. The fourth one uses the results of the first three to calculate the average number of transactions, and is later used as an attribute for creating a segmentation.
The list of expressions:
- An expression that returns the timestamp of the current date
- An expression that returns the timestamp of the first customer’s transaction expressed in milliseconds
- An expression that returns the number of months that passed since the first transaction
- An expression that returns the average number of transactions per month
Timestamp of the current day
- Go to Analytics > Expressions > New expression.
- Enter the name of the expression, for example
Timestamp - today
. - As the expression type, select Attribute.
- Create the following formula of the expression:
- Save the expression.
Timestamp of the customer’s first transaction in milliseconds
- Go to Analytics > Expressions > New expression.
- Enter the name of the expression, for example
Timestamp of the first transaction - milliseconds
. - As the expression type, select Attribute.
- Create the following formula of the expression:
- Save the expression
Number of months since the first transaction
- Go to Analytics > Expressions > New expression.
- Enter the name of the expression, for example
Months since the first transaction
. - As the expression type, select Attribute.
- Create the following formula of the expression.
- Save the expression.
Average number of transactions per month
- Go to Analytics > Expressions > New expression.
- Enter the name of the expression, for example
Average number of transactions per month
. - As the expression type, select Attribute.
- Create the following formula of the expression:
- Save the expression.
Create segmentation
In the final part of the process, create a segmentation that organizes customers into three groups:
- More than 2 transactions per month - It gathers the customers who make more than 2 transactions per month on average
- 2 transactions per month - It gathers the customers who make 2 transactions per month on average
- Less than 2 transactions per month - It gathers the customers who make less than 2 transactions per month on average
- Go to Analytics > Segmentations > New segmentation.
- Rename Segment A to
More than 2
. - Click Add segment.
- Rename Segment B to
2
. - Click Add segment.
- Rename Segment C to
Less than 2
. - Configure the conditions of each segment:
More than 2- Click Have property…
- Select the Average number of transactions per month expression
- As the logical parameter, select MORE ()
- As the value, enter
2
. - Click Performed event…
- Select the transaction.charge event.
2- Click Have property…
- Select the Number of months since the first transaction expression
- As the logical parameter, select Equal ()
- As the value, enter
2
. - Click Performed event…
- Select the transaction.charge event.
Less than 2- Click Have property…
- Select the Number of months since the first transaction expression
- As the logical parameter, select LESS ()
- As the value, enter
2
. - Click Performed event…
- Select the transaction.charge event.
- Save the segmentation.
Below the settings of the segmentation, you can preview how your customer base splits according to the defined conditions. - Click Show preview.
You receive the number of customers in each segment and the percentage of each segment in relation to the whole population in the segmentation. Additionally:
- You can change the chart type - pie chart and column chart
- You can also export the information to CSV/XLSX (data) or JPEG/PNG/PDF (chart)
Check the use case set up on the Synerise Demo workspace
You can also check the configuration directly in Synerise Demo workspace:
- segmentation
- aggregate that counts a total number of transactions
- aggregate that returns the timestamp of the first transaction
- expression that returns the timestamp of the current date
- expression that returns the timestamp of the first customer’s transaction
- expression that returns the number of months that passed since the first transaction
- expression that returns the average number of transactions per month
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.