Common events

page_view

The page_view call lets you record whenever a user sees a page of your website, along with any optional properties about the page.

Parameters (required and recommended)

NameTypeRequiredExample ValueDescription

page_type

string

Yes

product_list

Page category. Recommended predefined types:

  • home

  • landing

  • product_list

  • product

  • content_list

  • content

  • search

  • funnel

  • success

  • funnel_confirmation

  • account

  • cart

  • legal (e.g. Privacy Policy)

Equivalent to tc_vars.env_template

page_name

string

No

Suggestion for Mother's Day

Name of the page.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

type (deprecated)

string

No

product_list

Page category.

Automatically added parameters by cact API for web sources

NameTypeRequiredExample ValueDescription

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

title

string

No

Products - MySite.com

Title of the page :document.title from the DOM API

url

string

No

Full URL of the page. Equivalent tolocation.href from the DOM API.

path

string

No

/products/mothers

Path portion of the URL of the page : location.pathname from the DOM API.

referrer

string

No

Full URL of the previous page : document.referrer from the DOM API.

Example

cact('trigger','page_view', {
  page_type: 'product_list',
  page_name: 'Best sellers',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});

login

Send this event to signify that a user has logged in.

Parameters

NameTypeRequiredExampleDescription

method

string

No

LinkedIn

The method used to login.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

Example

cact('trigger', 'login', {
  method: 'LinkedIn',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});

Use this event to contextualize search operations. This event can help you identify the most popular content in your app.

Parameters

NameTypeRequiredExample valueDescription

search_term

string

Yes

t-shirts

The term that was searched for.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

Example

cact('trigger','search', {
  search_term: 't-shirts',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});

select_content

This event signifies that a user has selected some content of a certain type. This event can help you identify popular content and categories of content in your app or click on internal promotion.

Parameters

NameTypeRequiredExample valueDescription

content_type

string

No

product

The type of selected content.

item_id

string

No

I_12345

An identifier for the item that was selected.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

Example

cact('trigger','select_content', {
  content_type: 'product',
  item_id: 'I_12345',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});

sign_up

This event indicates that a user has signed up for an account.

Parameters (required and recommended)

NameTypeRequiredExampleDescription

method

string

No

Facebook

The method used for sign up.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

Example

cact('trigger','sign_up', {
  method: 'email',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});

- COMMON SCHEMAS -

User

When you send an event, it needs to carry enough information to identify which user made it. We can link events together using cookies. But destination partners require accurate identifiers to take actions.

id and email are usually the most useful parameters. Though some destination partners also use firstname, lastname, birthdate, city, ...

You won't always have all of those parameters. But it is recommended to send them as soon as you can during user's browsing.

Parameters (required and recommended)

NameTypeRequiredExample ValueDescription

id

string

No*

845454

User's main identifier (e.g. CRM id)

(*) required for many destinations and internal processing.

email

string

Yes*

john.doe@example.com

Email (plain value)

(*) required for many destinations and internal processing. Not required if email_sha256 is provided

email_md5

string

No*

8eb1b52... (size 32)

Email, hashed using MD5 algorithm. Not required if email is provided (see below)

email_sha256

string

No*

836f82d... (size 64)

Email, hashed using SHA-256 algorithm. Not required if email is provided (see below)

phone

string

No*

+33612345678

Phone number, E.164 format (*) required for some destinations.

firstname

string

No

John

First name

lastname

string

No

Doe

Last name

gender

string

No

m

Gender

  • f for Female

  • m for Male

birthdate

string

No

1970-01-01

Birth date, YYYY-MM-DD format

city

string

No

Boston

City

state

string

No

Massachusetts

State

zipcode

string

No

02108

Zip code

country

string

No

USA

Country code, ISO 3166-1 2-letter or 3-letter formats

consent_categories

Array

Yes

[1,2,3]

User's consent categories. Necessary to grant data sharing with destination partners. It is automatically filled from web sources if you use Commanders Act CMP.

About Hashing

In some cases, you won't be able to send a parameter plain value. It is either unavailable or restricted.

Thus it might be possible to send the hashed values. We currently accept 2 algorithm : md5 and sha256.

Every user.<property> can be sent under hashed format with algorithm suffix: _md5 or _sha256 (underscore followed by lowercase algorithm name)

Example :

{
  user: {
    email_md5: '8eb1b522f60d11fa897de1dc6351b7e8',                                      // md5('john.doe@example.com')
    email_sha256: '836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f',   // sha256('john.doe@example.com')
    phone_md5: '60dd761f55cb17f0532c9fb1679e8ddd',                                      // md5('+33612345678')
    phone_sha256: '42d573cfc315801d4cd8eddd5416b416a0bf298b9b9e12d6b07442c91db42bd8',   // sha256('+33612345678')
  }
}

ℹ️ we only support hex (base16) encoding (i.e.: hashed values are carried by strings with [0-9a-f] characters) Other encodings are not supported yet

No need to send both plain and hashed values :

  • if you send plain value, the hashed values aren't necessary We can generate hashed values on server side using plain value

  • if you don't send plain value, then you should fill as much hashed values as possible Partners require different hash algorithms and without plain value, we can't generate any hash. That's why we need the exact hashed value

Last updated