Send RFM score to Google Analytics

Published September 18, 2023
Modules
Difficulty
Powered by
OChK logo

You can power your Google Analytics data with information collected in Synerise. You can do it by sending an event to Google Analytics with the data extracted from Synerise such as the customer attributes, customer activities, results of analyses, predictions, and so on.

In this particular use case, we use the Automation module to send each visitor’s result of an RFM analysis to Google Analytics. The workflow is triggered every week for visitors from the last 7 days and sends the RFM analysis results of each customer to Google Analytics as an rfm.score event. The event contains two parameters:

  • score contains numeric information about the customer’s score,
  • rfmSegmentName contains the name of the RFM segment the customer belongs to.

Prerequisites


Process


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

  1. Create an expression that returns the name of the RFM segment a customer belongs to.
  2. Create a workflow that sends events to Google Analytics.

Create an expression that returns RFM segment name


In this part of the process, you will create an expression that retrieves a segment name from an RFM segmentation to which a customer belongs.

  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. Enter a meaningful name of the expression.
  3. Leave the Expression for at default (Attribute).
  4. Click the Select node.
  5. From the dropdown list, select Profile.
  6. Click the unnamed node.
  7. On the bottom of the page, click Choose attribute.
  8. From the dropdown list, select Segmentations.
  9. Find the RFM segmentation and select it.
    The configuration of the expression that returns RFM segment name
    The configuration of the expression that returns RFM segment name
  10. Save the expression.

Create a workflow


Create a workflow that is triggered for the customers who visited your website during the last 7 days. The system will send an rfm.score event with the score a customer received in the RFM analysis and with the name of the segment they belong to. The RFM result will be saved in Google Analytics for each customer, using the customer’s Google Analytics ID saved as a profile attribute in Synerise.

This workflow will be triggered once a week, for the group of customers who were active on the website during the last 7 days.

  1. In Synerise, go to Automation icon Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the audience of the workflow

The workflow is triggered for customers who visited a website during the last 7 days. Define the conditions in the following way:

  1. As the first node, add Audience. In the configuration of the node:
    1. Set the Run trigger option to repeatable.
    2. Set the interval to 1 week.
    3. In the Begin at field, select the first launch of the trigger.
    4. From the Timezone dropdown list, select the time zone consistent with the time zone selected for your workspace.
    5. In the Define audience section, click the New audience tab.
    6. From the Choose filter dropdown list, select page.visit.
    7. In the right bottom corner, set the date to Last 7 days.
    8. Confirm by clicking Apply.

Configure the Google Analytics node

In this step, you will configure the settings of the Google Analytics integration in the Send Event node. This includes:

  • Selecting the connection (for authorization purposes)
  • Defining the customer identifier - you will use an insert that retrieves the value of the cid attribute that stores the Google Analytics ID
  • Defining the event and event parameters to be sent to Google Analytics

You can find the detailed instructions for each action below.

Note: If you want to learn more about Send Event node, click here.
  1. On the Audience node, click THEN.
  2. From the node list, select Google Analytics > Send Event.
  3. In the configuration of the node:
    1. Select the connection.
      If you havenโ€™t established a connection yet, see Create a connection.

    2. In the Customer ID field, enter {{ customer['cid'] }}
      This way, you will retrieve the value of the cid attribute.

    3. In the Event name field, enter rfm.score

    4. In the Event parameters field, enter the parameters of the event in the form of the JSON object.
      The object uses the {% expression %} insert to refer to the value of the RFM-related expressions.
      For example:

      {
          "score": "{% expression %} rfm-score-expression {% endexpression %}",
          "rfmSegmentName": "{% expression %} rfm-segment-name-expression {% endexpression %}"
      }
              

  4. Confirm by clicking Apply.
The configuration of the Send Event node
The configuration of the Send Event node

Add the finishing node

  1. On the Send Event, click THEN.

  2. Add the End node.

    Final configuration of workflow
    Final configuration of the workflow
  3. Activate the workflow by clicking Save & Run.

Check the use case set up on the Synerise Demo workspace


You can check the configuration of:

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