Lifetime value prediction

Knowing how much money customers will spend in the next couple of days or weeks can be crucial for creating precise marketing campaigns. This use case describes how to make a prediction that returns the expected number of transactions in 90 days ahead for a specific group of customers.

LTV prediction
LTV prediction

Prerequisites


Create prediction target


In the first part of the process, create an analyses based on which the system will make a prediction.

  1. Go to Analytics icon Analytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. Set the Aggregate option to Sum.
  4. Click Choose event.
  5. From the dropdown list, select transaction.charge.
    Note: Events may have different labels between business profiles, but you can always find them by their action name (in this step, it’s transaction.charge).
  6. As the parameter of the event, select $totalAmount.
  7. Using the date picker in the lower-right corner, set the time range to Relative time range > Custom > last 90 days.
    The formula of the aggregate
    The formula of the aggregate
  8. Save the aggregate.
  9. Go to Analytics icon Analytics > Expressions > New expression.
  10. Enter the name of the expression.
  11. Set the Expression to Attribute.
    Predictions work only with attribute expressions.
  12. On the canvas, click Select.
  13. From the dropdown list, select Customer.
  14. Click the unnamed input that appeared on the canvas.
  15. From the Choose attribute dropdown list, select the aggregate you created in the previous part of the process.
    The formula of the expression
    The formula of the expression
  16. Save the expression.

Create a segmentation


In this part of the process, create a group of customers for whom the prediction will be made.

Tip: The conditions of the segmentation can be very complex. It usually makes sense to analyze customers with some activities observed, so in this use case, the segmentation contains customers who have at least one page visit during the last 30 days.
  1. Go to Analytics > Segmentation > New segmentation.
  2. Enter the name of the segmentation.
  3. Create a segmentation of customers who visited your website in the last 30 days.
    Note: You can find the instructions on creating segmentations here.
  4. Save the segmentation.

Create a prediction


In this part of the process, create a prediction that returns the number of transactions that will be made in the 90 days in advance.

  1. Go to Prediction icon Predictions > New prediction.
  2. Enter the name of the prediction.
  3. In the Prediction type section, click Define.
  4. Select Regression.
  5. Confirm by clicking Apply.

Select the audience

In this section, select the group of customers you created in this part of the process.

Note: Selecting the audience, especially its size, is always a trade-off between reach, duration of calculation and costs of data points produce.
  1. In the Audience section, click Define.
  2. Click Choose segmentation.
  3. Select the the group of customers you created in this part of the process.
  4. Click Apply.

Select the target

  1. In the What would you like to predict? section, click Define.
  2. Click Select expression.
  3. From the dropdown list, select the expression you created in this part of the process.

Select inputs

In this section, you set up input features based on which the prediction model will be trained.

It is possible to select feature inputs manually, but we recommend using the automatic selection, as explained below. Our algorithms evaluate feature relevance in context of the prediction target and are, in most cases, more effective than manual selection.

  1. In the Model inputs section, click Define.
  2. Click Add features.
  3. From the dropdown list, select Automatically.
  4. Click Apply.

Configure additional settings

The additional settings define how often re-calculations are made and the content of events produced by the prediction.

  1. In the Model configuration secion, from the dropdown list select 90 days as the number of days in advance.
    The time must correspond to the time range selected earlier in the prediction target.
  2. Leave the Set up recurring prediction calculation option unselected. As a result, the prediction is run only one time.
  3. In the How would you like to display results? section, select 5-point scale as the prediction labeling method.
  4. In the How many features would you like to display as event parameters? section, leave the settings at default (0).
  5. In the Name field, enter the user friendly name of predictions scores. The score name parameter is shown in the snr.prediction.score event.
  6. Click Apply.
  7. Complete the prediction by clicking Save&Calculate.
    Result: The calculation begins. After it completes, an event named snr.prediction.score is saved to the customer profiles selected in the segmentation. The event will be available in the platform, for instance in Analytics, Profiles, and Automation.

What’s next?

You can use the prediction results in your work, for example to Evaluate results.

😕

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