The name of the events in Spotler Activate refer to the triggers of the interactions. The events received in Spotler Activate can be found on the Data page. In each event it is mentioned when the event was received and which (if any) url triggered the event. The events of a profile can be found in the event data of the profile.
Events can be divided into the following categories:
- Default events created by Spotler Activate
- Mandatory events
- Other frequently used events
- Custom events
If you need to add extra information to the event, use the (custom) profile and event fields.
Useful link: How do I create an event using Google Tag manager?
Default events created by Spotler Activate
The following events are created by Spotler Activate:
A profile triggers the SessionStart event when it visits the website and has not triggered an event on the website in the past 30 minutes. After triggering a SessionStart, any event on the website ensures that the next SessionStart event cannot be triggered for 30 minutes.
Scenario 1
- Profile A visits the website = SessionStart
- Profile A leaves the website
- Profile A returns to the website after 30 minutes = SessionStart
Scenario 2
- Profile B visits the website = SessionStart
- Profile B leaves the website
- Profile B returns to the website after 10 minutes = No SessionStart
Scenario 3
- Profile C visits the website = SessionStart
- Profile C is inactive for 30 minutes and does not trigger an event
- Profile C triggers an event = SessionStart
In the SessionStart event, no fields are sent along:
A profile triggers the PersonalizationView event when it meets the conditions of a personalization.
In the PersonalizationView event, the following fields are provided:
- Personalization_id & personalization_id_view: the id of the personalization for which the profile matched the conditions
- Personalization_variant_id & personalization_variant_id_view: the id of the personalization variant that is assigned to the profile
- Control_variant:
- True, when the profile is assigned to the control variant
- False, when the profile is not assigned to the control group variant
Scenario 1
Profile A clicks on a personalization that redirects to the shopping cart = PersonalizationClick
Scenario 2
Profile B clicks the send button of a newsletter personalization, but forgets to fill in his email address = no PersonalizationClick and the missing fields are marked red
Scenario 3
Profile C clicks the send button of the newsletter personalization after having filled in his email address = PersonalizationClick
In the PersonalizationClick event, the following fields are sent along:
- Personalization_id & personalization_id_click: the id of the personalization that the profile clicked on
- Personalization_variant_id & personalization_variant_id_click: the id of the personalization that the profile clicked on
- Product array: (if any) the product that was clicked on in the personalization
If more fields are displayed in the event, they are additional fields will be included in the event.
A profile triggers the PersonalizationClosed event when it clicks a personalization click away.
In the PersonalizationClosed event, the following fields are included:
- Personalization_id & personalization_id_closed: the id of the personalization that the profile clicked away.
- Personalization_variant_id & personalization_variant_id_view: the id of the personalization variant that made the profile click away.
- Product array: (if any) the product that was shown in the personalization.
Mandatory events
The following events are mandatory because you need them to use the most essential features in Spotler Activate:
A profile triggers the ViewContent event when it views a product page on the website.
In the ViewContent event, the following fields are sent along as a minimum:
- Product array with:
- Id: the SKU of the viewed product
Note: the product id in the event needs to match the SKU of the product in Spotler Activate!
When products are offered in more than one language, also the language (in which the product is viewed) has to be part of the productarray as language. The notation for the language is ISO-639-1-ISO-3166 alpha 2.
If more fields are displayed in the event, they will be additional fields are added to the event.
Custom HTML tag
For implementation in Google Tag manager.
var products = {{DLV - products product page}};
var sqProducts = [];
var data = {};
data.event = "ViewContent";
for (var i = 0; i < products.length; i++) {
sqProducts[i] = [];
if (products[i].id != null) {
sqProducts[i].id = products[i].id;
}
if (products[i].name != null) {
sqProducts[i].name = products[i].name;
}
if (products[i].price != null) {
sqProducts[i].price = products[i].price;
}
}
data.products = sqProducts;
window._sqzl = window._sqzl || [];
window._sqzl.push(data);
A profile triggers the purchase event when it has completed a payment.
In the Purchase event the following fields are recommended:
- Email: the email address of the profile (this can also be a hash, where you send the email address yourself via a backend event)
- Orderid: the id of the order
- Productarray with:
- Id: the SKU of the purchased product
- Quantity: the number of the product purchased
Note: the product id in the event should match the SKU of the product in Spotler Activate!
When products are offered in multiple languages, also the language (in which the product is purchased) has to be part of the product array as language. The notation for the language is ISO-639-1-ISO-3166 alpha 2.
By default the calculated value is the product prices x quantity. If you want to overrule this (for example including extra costs), you can add the totalvalue field. When more fields are displayed in the event, they will be included in the event additional fields sent in the event.
Custom HTML tag
For implementation in Google Tag manager.
var products = {{DLV - purchase products}};
var order = {{DLV - purchase actionfield}};
var sqProducts = [];
var data = {};
data.event = "Purchase";
if (order.id != null) {
data.orderid = order.id;
}
if (order.revenue != null) {
data.totalvalue = order.revenue;
}
for (var i = 0; i < products.length; i++) {
sqProducts[i] = [];
if (products[i].id != null) {
sqProducts[i].id = products[i].id;
}
if (products[i].name != null) {
sqProducts[i].name = products[i].name;
}
if (products[i].price != null) {
sqProducts[i].price = products[i].price;
}
if (products[i].quantity != null) {
sqProducts[i].quantity = products[i].quantity;
}
}
data.products = sqProducts;
window._sqzl = window._sqzl || [];
window._sqzl.push(data);
Send event from backend and frontend
It is recommended to send the purchase event from the frontend and backend to Spotler Activate. The frontend purchase is triggered when the thank you page is loaded on the website, while the backend purchase is triggered from the order system. Based on the orderid, the frontend and backend purchases are merged into one purchase.
Because of the following situations, both the front-end and backend purchase are recommended:
- The frontend purchase is not always triggered because the thank you page is not loaded
- Some Adblockers do not accept cookies and therefore do not send frontend events to Spotler Activate
Example: Frontend purchase only
- Profile A does a purchase
- Profile A clicks away the thank you page before it is loaded = no frontend purchase, so no purchase
Example: Frontend & Backend purchase
-
Profile B will make a purchase
-
Profile B clicks away the thank you page before it loads = no frontend purchase
-
The order system sends a message that Profile B has made a purchase = backend purchase
A profile triggers the AddToCart event when it adds a product to the cart.
In the AddToCart event, the following fields are sent along as a minimum:
- Product array with:
- Id: the id of the product that is added to the cart
- Quantity: the amount of the product which is put in the cart
Note: the product id in the event must match the SKU of the product in Spotler Activate!
When products are offered in more than one language, also the language (in which the product is added to the cart) has to be part of the product array as language. The notation for the language is ISO-639-1-ISO-3166 alpha 2.
If more fields are displayed in the event, they will be additional fields are added to the event.
Custom HTML tag
For implementation in Google Tag manager.
var products = {{DLV - products cart}};
var sqProducts = [];
var data = {};
data.event = "AddToCart";
for (var i = 0; i < products.length; i++) {
sqProducts[i] = [];
if (products[i].id != null) {
sqProducts[i].id = products[i].id;
}
if (products[i].name != null) {
sqProducts[i].name = products[i].name;
}
if (products[i].price != null) {
sqProducts[i].price = products[i].price;
}
if (products[i].quantity != null) {
sqProducts[i].quantity = products[i].quantity;
}
}
data.products = sqProducts;
window._sqzl = window._sqzl || [];
window._sqzl.push(data);
Other frequently used events
The following events are frequently used by other users:
A profile triggers the PageView event when it views a page on the website.
The PageView event has no mandatory fields. The event will arrive in Spotler Activate as follows:
- If the event displays more fields, additional fields are included in the event.
A profile triggers the ViewCategory event when it views a category page on the website.
In the ViewCategory event, the following fields are minimally sent along:
- Category_id: the id of the viewed category
Note: the category id in the event needs to match the category id in Spotler Activate!
If more fields are displayed in the event, extra fields will be sent in the event.
To check if the category id corresponds with the category id in Spotler Activate. Check the category id in the event. Go to Products > Category. Look up the category name in the search bar and click on the category. Check if the category id matches.
Custom HTML tag
For implementation in Google Tag manager.
var data = {};
data.event = "ViewCategory";
if ({{DLV - category}} != null) {
data.category_id = {{DLV - category}};
}
window._sqzl = window._sqzl || [];
window._sqzl.push(data);
A profile triggers the Search event when it performs a search on the website.
In the Search event at least the following fields are sent along:
- Keyword: the search word entered by the profile
If more fields are displayed in the event, they will be additional fields are added to the event.
A profile triggers the EmailOptIn event when it signs up for the newsletter (in the footer on the website, for example).
The following fields are sent as a minimum in the EmailOptIn event:
- Email: the email address of the profile
- Newsletter: newsletter permission with the content yes
If more fields are displayed in the event, they will be additional fields are added to the event.
A profile triggers the CompleteRegistration event when it completes a registration or login.
In the CompleteRegistration event, the following fields are recommended:
- Email: the email address of the profile
If more fields are displayed in the event, they will be additional fields are added to the event.
A profile triggers the RemoveFromCart event when it removes a product from the cart.
In the RemoveFromCart event, the following fields are minimally sent along:
Productarray with:
- Id: the id of the product that is removed from the cart
Attention: the product id in the event needs to correspond with the SKU of the product in Spotler Activate!
When products are offered in more than one language, also the language (in which the product is removed from the shopping cart) has to be part of the product array as language. The notation for the language is ISO-639-1-ISO-3166 alpha 2.
If more fields are displayed in the event, they will be additional fields are added to the event.
How do I set the removefromcart event?
Custom HTML tag
For implementation in Google Tag manager.
var products = {{DLV - remove cart products}};
var sqProducts = [];
var data = {};
data.event = "RemoveFromCart";
for (var i = 0; i < products.length; i++) {
sqProducts[i] = [];
if (products[i].id != null) {
sqProducts[i].id = products[i].id;
}
if (products[i].name != null) {
sqProducts[i].name = products[i].name;
}
if (products[i].price != null) {
sqProducts[i].price = products[i].price;
}
if (products[i].quantity != null) {
sqProducts[i].quantity = products[i].quantity;
}
}
data.products = sqProducts;
window._sqzl = window._sqzl || [];
window._sqzl.push(data);
A profile triggers the InitiateCheckout event when it starts the checkout flow.
The InitiateCheckout event has no mandatory fields. The event will arrive in Spotler Activate as follows:
If more fields are displayed in the event, they will be additional fields will be included in the event.
A profile triggers the PrePurchase event when it is referred to an external payment solution.
In the PrePurchase event the following fields are sent along as a minimum:
- Email: the email address of the profile
If more fields are displayed in the event, extra fields are sent along in the event.
Custom events
Do you want to track an event that isn't one of the above? Create a custom event. A profile triggers a custom event to capture certain behavior.
If the event displays more fields, additional fields will be included in the event.
Custom events can be implemented with both Frontend and Backend Tracking.