To speed up event integration on your website, you can implement DataLayer integration using the template below. If you apply the template for the events in the document, considering the data you want to collect from your site and the setup you will perform, the web event integration time will be shortened and a standard will be established for the next setups. These events can also be used in your integrations in different 3rd party products. |
Before starting the event template implementation, please make sure that Google Tag Manager (GTM) and DataLayer is implemented on your site. |
When the registered member logs in, data is sent to the DataLayer.
Visilabs Parameters:
OM.exVisitorID (REQUIRED)
OM.b_login (REQUIRED)
Sample data sent to DataLayer:
//Login dataLayer.push({ event: "vlEvent", label: "VL-Login", vl_userID: "ID or email of user", // Required }); |
When the member is a new registration, data is sent to the DataLayer.
Visilabs Parameters:
OM.exVisitorID (REQUIRED)
OM.b_sgnp (REQUIRED)
Sample data sent to DataLayer:
// Signup dataLayer.push({ event: "vlEvent", label: "VL-Signup", vl_userID: "ID or email of user", // Required }); |
Onsite Searched keyword data is sent to the DataLayer.
Visilabs Parameters:
OM.OSS (REQUIRED)
OM.OSSR (OPTIONAL)
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-SearchResultView", vl_search: { word: "Searched Word", // Required result: "Product Count Of Founded Search Result" // Optional } }); |
When a category is entered in the site, data is sent to the DataLayer.
Visilabs Parameters:
OM.clist (REQUIRED)
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-CategoryView", vl_category_id: "Category ID" // Required }); |
Product view data is sent to DataLayer.
Visilabs Parameters
OM.pv (REQUIRED)
OM.pn (REQUIRED)
OM.inv (REQUIRED)
OM.ppr (REQUIRED)
OM.pv.1(OPTIONAL)
OM.pv.2 (REQUIRED for variant integration)
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-ProductDetailView", 'vl_ecommerce': { 'detail': { 'product': { 'name': 'Product Name', // Required 'id': 'Product Code', // Required 'price': 'Product Price', // Required 'stock': 'Product Stock', // Required 'brand': 'Product Brand', // Optional 'category': 'Product Category', // Optional 'item_group_id': 'Product variantID' // Optional } } } }); |
Add to cart and Remove from cart data is sent to DataLayer.
Visilabs Parameters
OM.pbid (REQUIRED)
OM.pb (REQUIRED)
OM.pu (REQUIRED)
OM.ppr(REQUIRED)
OM.pb.2 (REQUIRED for variant integration)
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-CartView", 'vl_ecommerce': { 'cart': { 'basket_id': 'Unique Basket ID', // Required 'products': [ { 'id': 'Product Code', // Required 'price': 'Product Price', // Required 'qty': 'Product Quantity', // Required 'brand': 'Product Brand', // Optional 'item_group_id': 'Product variantID' // Optional }, { 'id': 'Product Code', // Required 'price': 'Product Price', // Required 'qty': 'Product Quantity', // Required 'brand': 'Product Brand', // Optional 'item_group_id': 'Product variantID' // Optional } ] } } }); |
Data is sent to the DataLayer when a product is added or removed from the favourite.
Visilabs Parameters:
OM.pf (REQUIRED)
OM.pfu (REQUIRED)
OM.ppr (REQUIRED)
Sample data sent to DataLayer
// Add dataLayer.push({ event: "vlEvent", label: "VL-AddFav", vl_product: { id: "Product Code", // Required qty: "1", // Required price: "Product Price" // Required } }); // Remove dataLayer.push({ event: "vlEvent", label: "VL-RemoveFav", vl_product: { id: "Product Code", // Required qty: "-1", // Required price: "Product Price" // Required } }); |
After the product is purchased, data is sent to the DataLayer.
Visilabs Parameters:
OM.tid (REQUIRED)
OM.pp (REQUIRED)
OM.pp.2 (REQUIRED for variant integration)
OM.pu (REQUIRED)
OM.ppr (REQUIRED)
OM.exVisitorID (REQUIRED)
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-PurchaseView", 'vl_ecommerce': { 'checkout': { 'purchase_id': 'Receipt ID', // Required 'products': [ { 'id': 'Product Code', // Required 'qty': 'Product Quantity', // Required 'price': 'Product Price', // Required 'brand': 'Product Brand', // Optional 'item_group_id': 'Product variantID' // Optional }, { 'id': 'Product Code', // Required 'qty': 'Product Quantity', // Required 'price': 'Product Price', // Required 'brand': 'Product Brand', // Optional 'item_group_id': 'Product variantID' // Optional } ] } } }); |
The code that should be sent to DataLayer on all pages except all the pages mentioned in this document.
Visilabs Parameters:
OM.uri (REQUIRED)
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-PageView" }); |
If there are additional events to be sent on the web page, data is sent to the DataLayer. This data can be sent as a parameter-value, whether an array is requested in the DataLayer.
Visilabs Parameters
These parameters should be created by the Integration team in the visilabs panel, according to the data type and quantity to be sent by the customer.
Sample data sent to DataLayer
dataLayer.push({ event: "vlEvent", label: "VL-CustomEventType1", 'vl_ecommerce': { 'detail': { 'CustomEventArray': { 'Attribute1': 'Attribute1 Value', // Required 'Attribute2': 'Attribute2 Value', // Required 'AttributeN': 'AttributeN Value' // Required } } } }); |
Or
dataLayer.push({ event: "vlEvent", label: "VL-CustomEventType2", vl_CustomEventAttribute1: "Attribute1 Value", // Required vl_CustomEventAttribute2: "Attribute2 Value", // Required vl_CustomEventAttributeN: "AttributeN Value", // Required }); |