Visit events
To measure the available inventory for ads, it is necessary to send the contextual information related to each placement defined during the setup of your account. In a client-side integration, triggering this event will display the ads.
The table below lists the different possible page types along with their corresponding codes :
Homepage
home
Hub navigation page
hub
Search result page
search
Product listing page
plp
Product detail page
pdp
Homepage
The following event should be fired for the home placement:
<script type="text/javascript">
window.vzbl_q = window.vzbl_q || [];
window.vzbl_q.push({
event: "visit",
value: {
placement: "home",
alias: "233eca12ac66bd99b410dae07ca910d9"
}
});
</script>
Search result page
The following event should be fired for the search placement:
<script type="text/javascript">
window.vzbl_q = window.vzbl_q || [];
window.vzbl_q.push({
event: "visit",
value: {
placement: "search",
search_terms: "smart home device"
}
});
</script>
Product listing page
The following event should be fired for the plp placement:
<script type="text/javascript">
window.vzbl_q = window.vzbl_q || [];
window.vzbl_q.push({
event: "visit",
value: {
placement: "plp",
category: "c29023"
}
});
</script>// Some code
Product detail page
The following event should be fired for the pdp placement:
<script type="text/javascript">
window.vzbl_q = window.vzbl_q || [];
window.vzbl_q.push({
event: "visit",
value: {
placement: "pdp",
product: {
id: "sku910d",
categories: ["c290", "c2902", "c29023"]
}
}
});
</script>
placement
The code of the type of page visited / location
Example: "home", "search", "plp", "pdp"
YES
search_terms
The keywords searched by the user
Example: "my search terms"
YES (search)
category
The main category id of the product listing page
Example: "cat1302"
YES (plp)
product.id
The product identifier of the product detail page
Example: "pid9123374"
YES (pdp)
product.categories
Identifiers of product categories
Example: ["cat1", "cat13", "cat1302"]
YES (pdp)
listed_products.ids
A table containing the identifiers of the products present on the current page
Example: ["pid1", "pid23", "pid372"]
NO (search, plp)
alias
The customer identifier transformed with a hash function (MD5, SHA-256)
NO
Dernière mise à jour