Other
Last updated
Last updated
It is good practice to track when a user starts a new session. This would normally happen on the first page view of your website or when they open your app.
You can send any custom attributes along with this
interface SessionStart {
event: 'Session Started',
properties?: { ...custom }
}
fp360.track('Session Started', {
// optionally send custom attributes
})
You can send any custom attributes along with this.
interface SessionStart {
event: 'Session Ended',
properties?: { ...custom }
}
fp360.track('Session Ended', {
// optionally send custom attributes
})
Indicate an offline location has been visited such as a store.
$location -
fp360.track('Location Visited', {
$location: {
id: "234789",
name: "Fanplayr HQ",
country: "United States",
countryCode: "US",
region: "California",
city: "Palo Alto",
postalCode: "94301",
street: "725 Alma Street",
text: "725 Alma Street, Palo Alto, CA 94301",
latitude: 37.44178713736534,
longitude: -122.16064940120228
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Location Visited",
"properties": {
"$location": {
"id": "234789",
"name": "Fanplayr HQ",
"country": "United States",
"countryCode": "US",
"region": "California",
"city": "Palo Alto",
"postalCode": "94301",
"street": "725 Alma Street",
"text": "725 Alma Street, Palo Alto, CA 94301",
"latitude": 37.44178713736534,
"longitude": -122.16064940120228
}
}
}
Indicate a purchase was completed offline, such as in store.
fp360.track('Offline Purchase Completed', {
$order: {
orderNumber: "34859456045",
revenue: 73.40,
discount: 10.00,
discountCode: "10OFF",
tax: 5.00,
shipping: 7.00,
currency: "USD",
salesperson: "Jane",
cashier: "John",
products: [
{
id: "23489023",
sku: "23489023",
name: "Red Shoes",
categories: [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
price: 49.95,
quantity: 1,
url: "https://example.com/products/23489023",
imageUrl: "https://example.com/products/23489023.jpg",
currency: "USD",
variant: "Striped",
color: "Red",
size: "US 8",
brand: "Nike"
}
],
location: {
id: "243850934",
name: "Fanplayr HQ",
country: "United States",
countryCode: "US",
region: "California",
city: "Palo Alto",
postalCode: "94301",
street: "725 Alma Street",
text: "725 Alma Street, Palo Alto, CA 94301",
latitude: 37.44178713736534,
longitude: -122.16064940120228
}
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Offline Purchase Completed",
"properties": {
"$order": {
"orderNumber": "34859456045",
"revenue": 73.40,
"discount": 10.00,
"discountCode": "10OFF",
"tax": 5.00,
"shipping": 7.00,
"currency": "USD",
"salesperson": "Jane",
"cashier": "John",
"products": [
{
"id": "23489023",
"sku": "23489023",
"name": "Red Shoes",
"categories": [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
"price": 49.95,
"quantity": 1,
"url": "https://example.com/products/23489023",
"imageUrl": "https://example.com/products/23489023.jpg",
"currency": "USD",
"variant": "Striped",
"color": "Red",
"size": "US 8",
"brand": "Nike"
}
],
"location": {
"id": "243850934",
"name": "Fanplayr HQ",
"country": "United States",
"countryCode": "US",
"region": "California",
"city": "Palo Alto",
"postalCode": "94301",
"street": "725 Alma Street",
"text": "725 Alma Street, Palo Alto, CA 94301",
"latitude": 37.44178713736534,
"longitude": -122.16064940120228
}
}
}
}
Indicate a purchase was returned.
fp360.track('Purchase Returned', {
$order: {
orderNumber: "34859456045",
returnReference: "9764383",
returnReason: "Change of mind",
revenue: 73.40,
tax: 5.00,
currency: "USD",
cashier: "John",
products: [
{
id: "23489023",
sku: "23489023",
name: "Red Shoes",
categories: [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
price: 49.95,
quantity: 1,
url: "https://example.com/products/23489023",
imageUrl: "https://example.com/products/23489023.jpg",
currency: "USD",
variant: "Striped",
color: "Red",
size: "US 8",
brand: "Nike"
}
],
location: {
id: "243850934",
name: "Fanplayr HQ",
country: "United States",
countryCode: "US",
region: "California",
city: "Palo Alto",
postalCode: "94301",
street: "725 Alma Street",
text: "725 Alma Street, Palo Alto, CA 94301",
latitude: 37.44178713736534,
longitude: -122.16064940120228
}
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Purchase Returned",
"properties": {
"$order": {
"orderNumber": "34859456045",
"returnReference": "9764383",
"returnReason": "Change of mind",
"revenue": 73.40,
"tax": 5.00,
"currency": "USD",
"cashier": "John",
"products": [
{
"id": "23489023",
"sku": "23489023",
"name": "Red Shoes",
"categories": [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
"price": 49.95,
"quantity": 1,
"url": "https://example.com/products/23489023",
"imageUrl": "https://example.com/products/23489023.jpg",
"currency": "USD",
"variant": "Striped",
"color": "Red",
"size": "US 8",
"brand": "Nike"
}
],
"location": {
"id": "243850934",
"name": "Fanplayr HQ",
"country": "United States",
"countryCode": "US",
"region": "California",
"city": "Palo Alto",
"postalCode": "94301",
"street": "725 Alma Street",
"text": "725 Alma Street, Palo Alto, CA 94301",
"latitude": 37.44178713736534,
"longitude": -122.16064940120228
}
}
}
}
Indicate a widget was viewed. This can be used for online popups such as email collection, surveys or offers.
Indicate an action was taken on a widget. This can be used for online popups such as email collection, surveys or offers.
Indicate an offer was presented. This can be used online in cases where a special offer was presented to a user.
A recommendation was viewed.
fp360.track('Recommendation Viewed', {
$recommendation: {
id: "7812087d-d7ff-46d7-a790-eb60c4bb679f",
model: "Others You May Like",
products: [
{
id: "23489023",
sku: "23489023",
name: "Red Shoes",
categories: [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
price: 49.95,
quantity: 1,
url: http://example.com/products/23489023",
imageUrl: http://example.com/products/23489023.jpg",
currency: "USD",
variant: "Striped",
color: "Red",
size: "US 8",
brand: "Nike"
}
]
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Recommendation Viewed",
"properties": {
"$recommendation": {
"id": "7812087d-d7ff-46d7-a790-eb60c4bb679f",
"model": "Others You May Like",
"products": [
{
"id": "23489023",
"sku": "23489023",
"name": "Red Shoes",
"categories": [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
"price": 49.95,
"quantity": 1,
"url": "https://example.com/products/23489023",
"imageUrl": "https://example.com/products/23489023.jpg",
"currency": "USD",
"variant": "Striped",
"color": "Red",
"size": "US 8",
"brand": "Nike"
}
]
}
}
}
A recommendation was clicked.
fp360.track('Recommendation Clicked', {
$recommendation: {
id: "7812087d-d7ff-46d7-a790-eb60c4bb679f",
model: "Others You May Like",
products: [
{
id: "23489023",
sku: "23489023",
name: "Red Shoes",
categories: [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
price: 49.95,
quantity: 1,
url:http://example.com/products/23489023",
imageUrl:http://example.com/products/23489023.jpg",
currency: "USD",
variant: "Striped",
color: "Red",
size: "US 8",
brand: "Nike"
}
]
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Recommendation Clicked",
"properties": {
"$recommendation": {
"id": "7812087d-d7ff-46d7-a790-eb60c4bb679f",
"model": "Others You May Like",
"products": [
{
"id": "23489023",
"sku": "23489023",
"name": "Red Shoes",
"categories": [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
"price": 49.95,
"quantity": 1,
"url": "https://example.com/products/23489023",
"imageUrl": "https://example.com/products/23489023.jpg",
"currency": "USD",
"variant": "Striped",
"color": "Red",
"size": "US 8",
"brand": "Nike"
}
]
}
}
}
A recommendation was added.
fp360.track('Recommendation Added', {
$recommendation: {
id: "7812087d-d7ff-46d7-a790-eb60c4bb679f",
model: "Others You May Like",
products: [
{
id: "23489023",
sku: "23489023",
name: "Red Shoes",
categories: [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
price: 49.95,
quantity: 1,
url: http://example.com/products/23489023",
imageUrl: http://example.com/products/23489023.jpg",
currency: "USD",
variant: "Striped",
color: "Red",
size: "US 8",
brand: "Nike"
}
]
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Recommendation Added",
"properties": {
"$recommendation": {
"id": "7812087d-d7ff-46d7-a790-eb60c4bb679f",
"model": "Others You May Like",
"products": [
{
"id": "23489023",
"sku": "23489023",
"name": "Red Shoes",
"categories": [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
"price": 49.95,
"quantity": 1,
"url": "https://example.com/products/23489023",
"imageUrl": "https://example.com/products/23489023.jpg",
"currency": "USD",
"variant": "Striped",
"color": "Red",
"size": "US 8",
"brand": "Nike"
}
]
}
}
}
A recommendation was displayed to the user and then the user purchased one of these products.
fp360.track('Recommendation Purchased', {
$recommendation: {
id: "7812087d-d7ff-46d7-a790-eb60c4bb679f",
model: "Others You May Like",
products: [
{
id: "23489023",
sku: "23489023",
name: "Red Shoes",
categories: [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
price: 49.95,
quantity: 1,
url: http://example.com/products/23489023",
imageUrl: http://example.com/products/23489023.jpg",
currency: "USD",
variant: "Striped",
color: "Red",
size: "US 8",
brand: "Nike"
}
]
}
})
{
...<EVENT_MESSAGE_PROPERTIES>,
"event": "Recommendation Purchased",
"properties": {
"$recommendation": {
"id": "7812087d-d7ff-46d7-a790-eb60c4bb679f",
"model": "Others You May Like",
"products": [
{
"id": "23489023",
"sku": "23489023",
"name": "Red Shoes",
"categories": [
"Shoes & Accessories > Shoes",
"Shoes & Accessories > Shoes > Women Shoes"
],
"price": 49.95,
"quantity": 1,
"url": "https://example.com/products/23489023",
"imageUrl": "https://example.com/products/23489023.jpg",
"currency": "USD",
"variant": "Striped",
"color": "Red",
"size": "US 8",
"brand": "Nike"
}
]
}
}
}
Indicates that a form was submitted.
Example
fp360.track('Form Submitted', {
$widget: {
id: "19811",
name: "Present a great offer",
}
})
Example
{
...<EVENT_MESSAGE_PROPERTIES>,
"type": "track",
"event": "Form Submitted",
"properties": {
"$widget": {
"id": "19811",
"name": "Present a great offer"
}
}
}
Indicates that a form was interacted with.
Example
fp360.track('Form Interacted', {
$widget: {
id: "19811",
name: "Present a great offer",
}
})
Example
{
...<EVENT_MESSAGE_PROPERTIES>,
"type": "track",
"event": "Form Interacted",
"properties": {
"$widget": {
"id": "19811",
"name": "Present a great offer"
}
}
}
Indicates that a form was viewed.
Example
fp360.track('Form Viewed', {
$widget: {
id: "19811",
name: "Present a great offer",
}
})
Example
{
...<EVENT_MESSAGE_PROPERTIES>,
"type": "track",
"event": "Form Viewed",
"properties": {
"$widget": {
"id": "19811",
"name": "Present a great offer"
}
}
}
$order -
$order -
$widget -
$targeting -
$widget -
$targeting -
$widget -
$targeting -
$recommendation -
$widget -
$targeting -
$recommendation -
$widget -
$targeting -
$recommendation -
$widget -
$targeting -
$recommendation -
$widget -
$targeting -
$widget -
$widget -
$widget -