Skip to main content

Webservices related to Goals

Actito 'Goals' enable you to identify people who visit your website and to retrieve information about their behavior on your site: page visits and order confirmations.

When a profile reaches a goal, Actito will record an interaction between the goal and this profile. In addition to being used in statistics, goals can be used to target profiles, to add them to a segment or to trigger communications.

Creating a goal is not possible through API. It has to be done via the Actito interface. Moreover, a script must be done on your website, on any page targeted by the goal. For additional information on this subject, we invite you to read the chapter dedicated to 'Goals'.

However, webservices related to goals enable you to:

Recording goals through an external system

The main way of recording a goal is thanks to the interaction between the script inserted on your web pages and the cookie generated when a profile clicks on a link found in an Actito e-mail for which goal tracking is activated.

This would entail that only profile who already received and clicked in an Actito e-mail can reach goals. Thanks to the high connectivity that can be achieved through the Actito, you can nevertheless record goal interactions for a profile who reached a goal via an external system.

Two possibilities are available :

  • Generating the cookie yourself by retrieving the actId of a profile
  • Creating a goal interaction through API

Retrieving the actId of a profile

The concept of actId refers to the unique id which is used to link a given profile of a given DB to a goal. It is stored on a cookie dropped on the browser of the user. Its interaction with the script inserted on your web pages is necessary for goals to function properly.

This cookie is usually set through the means of an Actito e-mail. However, in order to offer connectivity between Actito and the various partner platforms or systems specific to your business, you can create this cookie yourself and drop it through any mean relevant to your activity (for example, after connecting to a customer area). This alternative will notably allow you to record goals for profiles who have never clicked in an Actito e-mail.

To create this cookie, you will need to retrieve the actId of each profile. This is possible through the operation GET/entity/{e}/goal/table/{t}/profile/{p}

The response to this request is the actId of the selected profile, which is a string of characters matching 1 profile in 1 DB that can be used to generate the goal cookie on your side.

Creating a transaction goal interaction

It is possible to create a transaction goal interaction for a given profile through the operation POST/entity/{e}/goals/{g}/profile/{p}/transaction

This allows you to record a transaction goal whatever might be the source that led to this transaction.

To create a transaction goal interaction, you will need to provided the following parameters in the body of the call:

  • amountCent: The transaction amount, in cents. In the Actito interface, this amount will be converted into €.
  • businessId: The key ID of the transaction.
  • comment: A comment associated with the transaction. You can choose what you want this field to display.
  • source: The source of the transaction. When creating the interaction through API, you can parameter this field to state the origin of the transaction.

Creating a Website visit goal interaction

It is also possible to create a website visit goal interaction to track the profiles who have visited a page of your website.

It is done through the operation POST/entity/{e}/goals/{g}/profile/{p}/websitevisit

In the JSON body, the matchedUrl parameter corresponds to the URL of the page visited by the profile. It must be a URL tracked in the goal definition in Actito.