There is a JavaScript API available within the Fresh Relevance script that goes onto your site that allows you to pass data and events from single page applications, without the need to rely on scraping or a data layer. This allows you to pass data from an app built with a framework such as React, Angular or vue.js (or plain JavaScript).
Learn more in Raise custom signals from your site.
The API allows your single page application, for example, one built using React, to inform Fresh Relevance of important changes. Your app should, for example:
Call the
pageChange
event when the SPA has finished loading.Call the
cartUpdate
event when the shopping cart contents change.
Before you start
Things you need to know:
Make sure to review all the events documented on this page and call those which are appropriate to your site.
There are APIs that allow you to:
Notify Fresh Relevance when a page has changed, for example, moved from a product list page to a product details page.
Pass through the data of the item on the current page.
Register for notifications when certain events occur within the Fresh Relevance script. You have the option of cancelling the event, for example, if you want to block a Slot from loading.
Raising events
$TB.hooks.fireEvent
can be called to allow Fresh Relevance to know that an event has occurred on your website such as a product browse or cart update. You are able to pass data along to Fresh Relevance such as the product information for a product browse event or the contents of a cart for a cart update event.
Expected parameters
eventName:string
The name of the event that has occurred, for a list of events available see $TB.hooks.validCallEvents()
.
data:object
An object containing the data for the event raised, this could be product information, user details or a cart. See the events section below for more information.
options:object
An object containing any additional parameters for the event, additional parameters listed under each event below.
Events
Detailed below is a list of each event and the data structure they expect to receive, your implementation may vary, if so please contact customer support and detail your expected data structure so that we can accommodate these changes.
Valid events for raising
$TB.hooks.validCallEvents
returns a list of valid event names that are callable using $TB.hooks.fireEvent
.
Example usage
$TB.hooks.validCallEvents();
Example return
[
"pageChange",
"productBrowse",
"productList",
"cartUpdate",
"addCartProduct",
"removeCartProduct",
"checkout",
"purchaseComplete",
"productVariantSelected",
"userLoggedIn"
]
pageChange
The pageChange
event can be called to notify Fresh Relevance that the web page is ready for evaluation. Custom code can be developed to analyse your webpage and extract relevant data such as product information, for more information on the different ways Fresh Relevance can integrate with your store please contact support.
Example usage
$TB.hooks.fireEvent("pageChange", null, {"sendBeacon": true})
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
productBrowse
The productBrowse
event should be fired when your customer navigates to a product detail page.
Example data structure
{
"url": "http://www.example.com/example_product",
"name": "Example Product",
"image": "http://www.example.com/example_product.jpg",
"thumbnail": ""http://www.example.com/example_product_tn.jpg"",
"description": "Example Product Description",
"variants": [
{
"url":"http://www.example.com/example_product_blue",
"name":"Example Product Blue",
"id": "example_product_blue",
"stock": 1,
"image": "http://www.example.com/example_product_blue.jpg",
},
{
"url":"http://www.example.com/example_product_red",
"name":"Example Product Red",
"id": "example_product_red",
"stock": 1,
"image": "http://www.example.com/example_product_red.jpg",
},
],
id: "example_product",
sku: "example_product_01",
price: 100.00,
sale_price: 89.99,
categories: [
"example products",
"on sale"
],
extra_data: {
"example_data": "example extra data",
"author": "John Doe",
"style": "polo",
"color": "red"
},
language: "ENG",
brand: "brand",
currency: "GBP",
"stock": 5
}
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
Example usage
$TB.hooks.fireEvent(
"productBrowse",
{
"url" "http://www.example.com/example_product"
...
},
{
"sendBeacon": true
}
)
productList
The productList
event should be fired when your customer navigates to a product list page. For example, a category page or department page; Menswear, electronics, health products.
Example data structure
The productList
event object can contain multiple products.
[
{
"url": "http://www.example.com/example_product",
"name": "Example Product",
"image": "http://www.example.com/example_product.jpg",
"thumbnail": ""http://www.example.com/example_product_tn.jpg"",
"description": "Example Product Description",
"variants": [
{
"url":"http://www.example.com/example_product_blue",
"name":"Example Product Blue",
"id": "example_product_blue",
"stock": 1,
"image": "http://www.example.com/example_product_blue.jpg",
},
{
"url":"http://www.example.com/example_product_red",
"name":"Example Product Red",
"id": "example_product_red",
"stock": 1,
"image": "http://www.example.com/example_product_red.jpg",
},
],
id: "example_product",
sku: "example_product_01",
price: 100.00,
sale_price: 89.99,
categories: [
"example products",
"on sale"
],
extra_data: {
"example_data": "example extra data",
"author": "John Doe",
"style": "polo",
"color": "red"
},
language: "ENG",
brand: "brand",
currency: "GBP",
"stock": 5
},
{...}
]
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
Example usage
$TB.hooks.fireEvent(
"productList",
[
{
"url" "http://www.example.com/example_product"
...
},
{...},
],
{
"sendBeacon": true
}
)
cartUpdate
The cartUpdate
event should be fired when your customer interacts with their cart. For example adding or removing an item, modifying the quantity of an item or apply a discount code to the cart.
Example data structure
{
cart_value: 89.99,
cart_quantity: 1,
cart_currency: "GBP",
extra_data: {
"example": "extra_data"
},
products: [
{
"url": "http://www.example.com/example_product",
"name": "Example Product",
"image": "http://www.example.com/example_product.jpg",
"thumbnail": ""http://www.example.com/example_product_tn.jpg"",
"description": "Example Product Description",
"variants": [
{
"url":"http://www.example.com/example_product_blue",
"name":"Example Product Blue",
"id": "example_product_blue",
"stock": 1,
"image": "http://www.example.com/example_product_blue.jpg",
},
{
"url":"http://www.example.com/example_product_red",
"name":"Example Product Red",
"id": "example_product_red",
"stock": 1,
"image": "http://www.example.com/example_product_red.jpg",
},
],
id: "example_product",
sku: "example_product_01",
price: 100.00,
sale_price: 89.99,
categories: [
"example products",
"on sale"
],
extra_data: {
"example_data": "example extra data",
"author": "John Doe",
"style": "polo",
"color": "red"
},
language: "ENG",
brand: "brand",
currency: "GBP",
"stock": 5
},
{...}
]
};
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
inPage:boolean
If the cart being captured is from an in-page or "mini" cart then the inPage
flag can be used to communicate this to Fresh Relevance. If this flag is not set the system identifies the page as a cart page.
Example usage
$TB.hooks.fireEvent(
"cartUpdate",
{
cart_value: 89.99,
cart_quantity: 1,
cart_currency: "GBP",
extra_data: {
"example": "extra_data"
},
products: [
{...}
]
},
{
"sendBeacon": true,
inPage: false
}
)
Checkout
The checkout
event can be fired when your customer navigates to a checkout page.
Example data structure
{
cart_value: 89.99,
cart_quantity: 1,
cart_currency: "GBP",
extra_data: {
"example": "extra_data"
},
products: [
{
"url": "http://www.example.com/example_product",
"name": "Example Product",
"image": "http://www.example.com/example_product.jpg",
"thumbnail": ""http://www.example.com/example_product_tn.jpg"",
"description": "Example Product Description",
"variants": [
{
"url":"http://www.example.com/example_product_blue",
"name":"Example Product Blue",
"id": "example_product_blue",
"stock": 1,
"image": "http://www.example.com/example_product_blue.jpg",
},
{
"url":"http://www.example.com/example_product_red",
"name":"Example Product Red",
"id": "example_product_red",
"stock": 1,
"image": "http://www.example.com/example_product_red.jpg",
},
],
id: "example_product",
sku: "example_product_01",
price: 100.00,
sale_price: 89.99,
categories: [
"example products",
"on sale"
],
extra_data: {
"example_data": "example extra data",
"author": "John Doe",
"style": "polo",
"color": "red"
},
language: "ENG",
brand: "brand",
currency: "GBP",
"stock": 5
},
{...}
]
};
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
Example usage
$TB.hooks.fireEvent(
"checkout",
{
cart_value: 89.99,
cart_quantity: 1,
cart_currency: "GBP",
extra_data: {
"example": "extra_data"
},
products: [
{...}
]
},
{
"sendBeacon": true
}
)
purchaseComplete
The purchaseComplete
event can be fired when your customer completes purchase of a cart.
Example data structure
{
orderNumber: "1234567",
}
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
Example usage
$TB.hooks.fireEvent(
"purchaseComplete",
{
orderNumber: "1234567",
},
{
"sendBeacon": true
}
)
productVariantSelected
The productVariantSelected
event can be fired when your customer selects a product variant on a product browse page or similar.
Example data structure
{
"url": "http://www.example.com/example_product_orange",
"name": "Orange Example Product",
"vid": "orange",
"stock": 1,
"image": "http://www.example.com/example_product_orange.jpg",
"parent_prid": "product0"
}
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
Example usage
$TB.hooks.fireEvent(
"productVariantSelected",
{
"url": "http://www.example.com/example_product_orange",
"name": "Orange Example Product",
"vid": "orange",
"stock": 1,
"image": "http://www.example.com/example_product_orange.jpg"
},
{
"sendBeacon": true
}
)
userLoggedIn
The userLoggedIn
event can be fired when a customer logs in or signs up, the customers details can then be passed along to Fresh Relevance.
Example data structure
{
"email": "jane_doe@example.com",
"firstName": "Jane",
"lastName": "Doe"
}
Options
"sendBeacon":boolean
The sendBeacon
flag communicates whether you would like the data recorded to be sent back to Fresh Relevance for processing. If this flag is not set the system sends a beacon after receiving data by default.
Example usage
$TB.hooks.fireEvent(
"userLoggedIn",
{
"email": "jane_doe@example.com",
"firstName": "Jane",
"lastName": "Doe"
},
{
"sendBeacon": true
}
)
Consuming events
$TB.hooks.registerEvent
allows for callback methods to be registered against events raised by Fresh Relevance when capturing information from your website.
Expected parameters
eventName:string
The name of the event that you wish to attach your callback method to, for a list of events raised by Fresh Relevance see $TB.hooks.validReturnEvents()
.
callback:function
A callback function you wish to run whenever the event has been raised.
Valid events to listen to
$TB.hooks.validReturnEvents
returns a list of valid event names that are raised by Fresh Relevance when actions occur within our system on your page. You are able to add event listeners to these events, for more information see $TB.hooks.registerEvent
.
Example usage
$TB.hooks.validReturnEvents();
Example return
[
"pageChangeCaptured",
"productCaptured",
"listCaptured",
"cartUpdated",
"checkoutCaptured",
"purchaseCompleteCaptured",
"userCaptured",
"slotPreload",
"slotPreinsert",
"slotInserted",
"personalizationComplete",
"initialSlotsLoadSkipped"
]
pageChangeCaptured
The pageChangeCaptured
event is raised when Fresh Relevance has completed an evaluation of the webpage. This event is often fired as the result of a pageChange
event call.
Example usage
$TB.hooks.registerEvent('pageChangeCaptured', function(meta){ // Callback code });
Expected response
store object
An object containing all data on this page captured by Fresh Relevance.
{
"sbc":1,
"skip_heartbeat":false,
"skip_initial_slots_load":false,
"is_single_page_app":false,
"c":"12ab3cd4ef",
"w":"websiteID",
"ip":"127.0.0.1",
"v":"1234567890123",
"doc":{
"r":"https://www.website.co.uk/about/",
"t":"Products for You - Shop Products Online | Website Name",
"u":"https://www.website.co.uk/"
},
"tmsd":{},
"extend":{},
"typ":1,
"ptyp":0,
"curr":"GBP",
"sbr":"website",
"ua":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36",
"bo":"runInitial",
"validate":true,
"trace":true,
"ignore_filters":true
}
productCaptured
Raised when a product has been captured by Fresh Relevance. This event is raised as a result of a productBrowse
or productVariantSelected
event being called.
Example usage
$TB.hooks.registerEvent('productCaptured', function(product){ // Callback code });
Expected response
product object
An object containing the product data captured on this page by Fresh Relevance.
{
"u":"https://website.co.uk/product/short_sleeve_shirt",
"n":"Short Sleeved Shirt",
"img":"https://cdn.website.co.uk/upload/siteimages/product0_img.jpg",
"desc":"The iconic short sleeved shirt.",
"prid":"product0",
"sku":"product0",
"cat":[
{
"g":"brand",
"n":"Brand Name"
}
],
"curr":"GBP",
"sbr":"website",
"uv":38,
"ruv":50,
"up":"£38.00",
"rup":"£50.00"
}
listCaptured
Raised when a product list page has been captured by Fresh Relevance. This event is raised as a result of a productList
event call.
Example usage
$TB.hooks.registerEvent('listCaptured', function(productList){ // Callback code });
Expected response
product list
An array containing objects of each product captured on this page by Fresh Relevance.
[
{
"u":"https://www.website.co.uk/product/handbag",
"n":"Handbag",
"prid":"product3",
"sku":"product3",
"cat":[
{
"g":"brand",
"n":"Brand Name"
}
],
"curr":"GBP",
"sbr":"website",
"uv":40,
"up":"£40.00",
"ruv":60,
"rup":"£60.00"
},
{
"u":"https://www.website.co.uk/product/trousers",
"n":"Trousers",
"prid":"product40",
"sku":"product40",
"cat":[
{
"g":"brand",
"n":"Brand Name"
}
],
"curr":"GBP",
"sbr":"website",
"uv":40,
"up":"£40.00",
"ruv":60,
"rup":"£60.00"
},
{
"u":"https://www.website.co.uk/product/headphones",
"n":"Headphones",
"prid":"product79",
"sku":"product79",
"cat":[
{
"g":"brand",
"n":"Brand Name"
}
],product40
"curr":"GBP",
"sbr":"website",
"uv":40,
"up":"£40.00",
"ruv":60,
"rup":"£60.00"
},
{
"u":"https://www.website.co.uk/product/dog-food",
"n":"Dog Food",
"prid":"product52",
"sku":"product52",
"cat":[
{
"g":"brand",
"n":"Brand Name"
}
],
"curr":"GBP",
"sbr":"website",
"uv":32,
"up":"£32.00",
"ruv":40,
"rup":"£40.00"
},
{
"u":"https://www.website.co.uk/product/hat",
"n":"Hat",
"prid":"product7",
"sku":"product7",
"cat":[
{
"g":"brand",
"n":"Brand Name"
}
],
"curr":"GBP",
"sbr":"website",
"uv":38,
"up":"£38.00",
"ruv":55,
"rup":"£55.00"
}
]
cartUpdated
Raised when a cart has been captured on this page by Fresh Relevance. This event is raised as a result of either a cartUpdate
, addCartProduct
or removeCartProduct
event call.
Example usage
$TB.hooks.registerEvent('cartUpdated', function(cart){ // Callback code });
Expected response
cart object
An object containing cart meta data such as cart total and a list of products in the cart.
{
"p":[
{
"u":"https://www.website.co.uk/product/short_sleeve_shirt",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product0_img.jpg",
"n":"Short Sleeved Shirt",
"prid":"product0",
"sku":"product0",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":38,
"up":"£38.00",
"ruv":50,
"rup":"£50.00",
"opt":{
"size":" Med"
}
},
{
"u":"https://www.website.co.uk/product/3_pack_of_socks",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product_img.jpg",
"n":"3 Pack of Socks",
"prid":"product1",
"sku":"product1",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":14,
"up":"£14.00",
"ruv":24,
"rup":"£24.00",
"opt":{
"size":" 7-11"
}
}
],
"qty":2,
"curr":"GBP",
"ex":{
"delivery":4.95
},
"cv":52,
"cp":"£52.00"
}
cartProductAdded
Raised when a cart has been captured on this page by Fresh Relevance. This event is raised as a result of either a cartUpdate
, or addCartProduct
event call.
Example usage
$TB.hooks.registerEvent('cartProductAdded', function(product){ // Callback code });
Expected response
cart object
An object containing cart meta data such as cart total and a list of products in the cart.
{
"p":[
{
"u":"https://www.website.co.uk/product/short_sleeve_shirt",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product0_img.jpg",
"n":"Short Sleeved Shirt",
"prid":"product0",
"sku":"product0",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":38,
"up":"£38.00",
"ruv":50,
"rup":"£50.00",
"opt":{
"size":" Med"
}
},
{
"u":"https://www.website.co.uk/product/3_pack_of_socks",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product_img.jpg",
"n":"3 Pack of Socks",
"prid":"product1",
"sku":"product1",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":14,
"up":"£14.00",
"ruv":24,
"rup":"£24.00",
"opt":{
"size":" 7-11"
}
}
],
"qty":2,
"curr":"GBP",
"ex":{
"delivery":4.95
},
"cv":52,
"cp":"£52.00"
}
cartProductRemoved
Raised when a cart has been captured on this page by Fresh Relevance. This event is raised as a result of either a cartUpdate
, or removeCartProduct
event call.
Example usage
$TB.hooks.registerEvent('cartProductRemoved', function(cart){ // Callback code });
Expected response
cart object
An object containing cart meta data such as cart total and a list of products in the cart.
{
"p":[
{
"u":"https://www.website.co.uk/product/short_sleeve_shirt",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product0_img.jpg",
"n":"Short Sleeved Shirt",
"prid":"product0",
"sku":"product0",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":38,
"up":"£38.00",
"ruv":50,
"rup":"£50.00",
"opt":{
"size":" Med"
}
},
{
"u":"https://www.website.co.uk/product/3_pack_of_socks",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product_img.jpg",
"n":"3 Pack of Socks",
"prid":"product1",
"sku":"product1",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":14,
"up":"£14.00",
"ruv":24,
"rup":"£24.00",
"opt":{
"size":" 7-11"
}
}
],
"qty":2,
"curr":"GBP",
"ex":{
"delivery":4.95
},
"cv":52,
"cp":"£52.00"
}
checkoutCaptured
Raised when a checkout page has been captured by Fresh Relevance. This event is raised as a result of a checkout event call.
Example usage
$TB.hooks.registerEvent('checkoutCaptured', function(cart){ // Callback code });
Expected response
cart object
An object containing cart meta data such as cart total and a list of products in the cart.
{
"p":[
{
"u":"https://www.website.co.uk/product/short_sleeve_shirt",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product0_img.jpg",
"n":"Short Sleeved Shirt",
"prid":"product0",
"sku":"product0",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":38,
"up":"£38.00",
"ruv":50,
"rup":"£50.00",
"opt":{
"size":" Med"
}
},
{
"u":"https://www.website.co.uk/product/3_pack_of_socks",
"img_tn":"https://cdn.website.co.uk/upload/siteimages/product_img.jpg",
"n":"3 Pack of Socks",
"prid":"product1",
"sku":"product1",
"curr":"GBP",
"sbr":"website",
"qty":1,
"uv":14,
"up":"£14.00",
"ruv":24,
"rup":"£24.00",
"opt":{
"size":" 7-11"
}
}
],
"qty":2,
"curr":"GBP",
"ex":{
"delivery":4.95
},
"cv":52,
"cp":"£52.00"
}
purchaseCompleteCaptured
Raised when a purchase complete page view has been captured by Fresh Relevance. This event is raised as a result of a purchaseComplete
event call.
Example usage
$TB.hooks.registerEvent('purchaseCompleteCaptured', function(store){ // Callback code });
Expected response
store object
An object containing all data on this page captured by Fresh Relevance. This may or may not include an order number, which is located in co.o_num
.
{
"sbc":1,
"skip_heartbeat":false,
"skip_initial_slots_load":false,
"is_single_page_app":false,
"c":"12ab3cd4ef",
"w":"websiteID",
"ip":"000.0.0.1",
"v":"1234567890123",
"doc":{
"r":"https://www.website.co.uk/about/",
"t":"Products for You - Shop Products Online | Website Name",
"u":"https://www.website.co.uk/"
},
"tmsd":{},
"extend":{},
"typ":1,
"ptyp":8,
"curr":"GBP",
"sbr":"websitename",
"co":{
"o_num":"AB123C"
},
"ua":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36",
"bo":"runInitial",
"validate":true,
"trace":true,
"ignore_filters":true
}
userCaptured
Raised when a user has been captured by Fresh Relevance. This event is raised as a result of a userLoggedIn
event call.
Example usage
$TB.hooks.registerEvent('userCaptured', function(person){ // Callback code });
Expected response
person object
An object containing user meta data such as name and email.
{
"fn":"John",
"ln":"Doe",
"e":"johndoe1@gmail.com"
}
Slot methods
Fresh Relevance uses slots on your website to deliver personalized content to your customers. The following methods are raised during the personalization process as personalized content is loaded into each of the Slots present on the webpage.
These methods can be used to track where in the process Fresh Relevance is while loading personalized content and run your own code to ensure that any content required for personalization is present or to perform other actions such as canceling personalization by Fresh Relevance or reloading the personalized content.
slotPreload
Raised before the request for slot data has been sent. This event is raised automatically before slots are loaded.
Cancelable: This event's default actions can be canceled using preventDefault()
in the same way other events can be prevented using the events API. Calling preventDefault()
cancels slot loading.
Example usage
$TB.hooks.registerEvent('slotPreload', function(slot){ // Callback code });
Expected response
{
"slid": "slot_id"
}
slotPreinsert
Raised when a slot has been loaded but before it is inserted onto the page. This event is raised automatically after slots have been loaded and before they have been inserted onto the page.
Cancelable: This event's default actions can be canceled using preventDefault()
in the same way other events can be prevented using the events API. Calling preventDefault()
cancels slot loading.
Example usage
$TB.hooks.registerEvent('slotPreinsert', function(slotMeta){ // Callback code });
Expected response
{
"slid": "slot_id",
"extra": {
html: "<h2>example</h2>",
js: "example;",
css: ".example {background-color: "red";}",
var: {},
meta: {}
}
}
slotInserted
Raised when a slot has been inserted onto the page. This event is raised automatically after slots have been loaded and inserted onto the page.
Example usage
$TB.hooks.registerEvent('slotInserted', function(slotMeta){ // Callback code });
Expected response
{
"slid": "slot_id",
"extra": {
html: "<h2>example</h2>",
js: "example;",
css: ".example {background-color: "red";}",
var: {},
meta: {}
}
}
personalizationComplete
Raised when all slots have been loaded onto the page. This event is raised automatically after all personalisation has been completed on the webpage.
Example usage
$TB.hooks.registerEvent('personalizationComplete', function(){ // Callback code });
initialSlotsLoadSkipped
Raised when the initial loading of slots has been skipped, this is raised as a result of a skipSlotsLoad
call.
Example usage
$TB.hooks.registerEvent('initialSlotsLoadSkipped', function(){ // Callback code });
Reloading Slots
$TB.hooks.reloadSlotConfig
can be called to reload the slot configuration on the current page, this adds any slots that have not been added to the page and populate them with their content. Slots that have been successfully loaded to the page before this call are not affected.
Example usage
$TB.hooks.reloadSlotConfig();