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)
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
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
user
Yes
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).
path
string
No
/products/mothers
Path portion of the URL of the page : location.pathname from the DOM API.
Example
cact('trigger','page_view', {
page_type: 'product_list',
page_name: 'Best sellers',
user: {
id: '12356',
email:'[email protected]',
consent_categories: [1,3]
}
});val event = TCPageViewEvent("product_list")
event.pageName = "Best sellers"
serverside.execute(event)TCPageViewEvent event = new TCPageViewEvent("product_list")
event.pageName = "Best sellers";
serverside.execute(event);TCPageViewEvent *event = [[TCPageViewEvent alloc] init];
event.pageType = @"product_list";
event.pageName = @"Best sellers";
[TCS execute: event];
//or you could also use it in a constructor, as follow:
TCPageViewEvent *event = [[TCPageViewEvent alloc] initWithType: @"type"];let event = TCPageViewEvent(type: "product list")
event?.pageName = "Best sellers"
serverside?.execute(event)var event = TCPageViewEvent();
event.pageName = "event_page_name";
event.pageType = "event_page_type";
serverside.execute(event);{
"event_name": "page_view",
"page_type": "product_list",
"page_name": "Best sellers"
}login
Send this event to signify that a user has logged in.
Parameters
method
string
No
The method used to login.
user
Yes
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:'[email protected]',
consent_categories: [1,3]
}
});val event = TCLoginEvent()
event.method = "LinkedIn"
serverside.execute(event)TCLoginEvent event = new TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);TCLoginEvent *event = [[TCLoginEvent alloc] init];
event.method = @"LinkedIn";
[TCS execute: event];let event = TCLoginEvent()
event.method = "linkedin"
serverside?.execute(event)var event = TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);{
"event_name": "login",
"method": "LinkedIn"
}search
Use this event to contextualize search operations. This event can help you identify the most popular content in your app.
Parameters
search_term
string
Yes
t-shirts
The term that was searched for.
user
Yes
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:'[email protected]',
consent_categories: [1,3]
}
});val event = TCSearchEvent("t-shirts")
serverside.execute(event)TCSearchEvent event = new TCSearchEvent("t-shirts");
serverside.execute(event);TCSearchEvent *event = [[TCSearchEvent alloc] init];
event.searchTerm = @"t-shirts";
[TCS execute: event];let event = TCSearchEvent(searchTerm: "t-shirts")
serverside.execute(event)var event = TCSearchEvent();
event.searchTerm = "t-shirts";
serverside.execute(event);{
"event_name": "search",
"search_term": "t-shirts"
}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
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
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:'[email protected]',
consent_categories: [1,3]
}
});val event = TCSelectContentEvent()
event.contentType = "product"
serverside.execute(event)TCSelectContentEvent event = new TCSelectContentEvent();
event.contentType = "product";
serverside.execute(event);TCSelectContentEvent *event = [[TCSelectContentEvent alloc] init];
event.contentType = @"product";
event.itemID = @"I_12345";
[TCS execute: event];let event = TCSelectContentEvent()
event.contentType = "product"
event.itemID = "I_12345"
serverside?.execute(event)var event = TCSelectContentEvent();
event.contentType = "product";
event.itemId = "I_12345";
serverside.execute(event);{
"event_name": "select_content",
"content_type": "product",
"item_id": "I_12345"
}sign_up
This event indicates that a user has signed up for an account.
Parameters (required and recommended)
method
string
No
The method used for sign up.
user
Yes
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:'[email protected]',
consent_categories: [1,3]
}
});val event = TCSignUpEvent()
event.method = "email"
serverside.execute(event)TCSignUpEvent event = new TCSignUpEvent();
event.method = "email";
serverside.execute(event);TCSignUpEvent *event = [[TCSignUpEvent alloc] init];
event.method = @"email";
[TCS execute: event];let event = TCSignUpEvent()
event.method = "email"
serverside?.execute(event)var event = TCSignUpEvent();
event.method = "email";
serverside.execute(event);{
"event_name": "sign_up",
"method": "email"
}- 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)
id
string
No*
845454
User's main identifier (e.g. CRM id)
(*) required for many destinations and internal processing.
email
string
Yes*
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)
firstname
string
No
John
First name
lastname
string
No
Doe
Last name
gender
string
No
m
Gender
ffor Femalemfor 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
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('[email protected]')
email_sha256: '836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f', // sha256('[email protected]')
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
Was this helpful?