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 web 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.

Login Event

When the registered member logs in, data is sent to the DataLayer.

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
  });

Sign Up

When a visitor registers, data is sent to the DataLayer.

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 Search

Onsite Searched keyword data is sent to the DataLayer.

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
      }
  });

Category Page View

When a category page is entered on the site, data is sent to the DataLayer.

Parameters:

OM.clist (REQUIRED)

Sample data sent to DataLayer

dataLayer.push({
  event: "vlEvent",
  label: "VL-CategoryView",
  vl_category_id: "Category ID" // Required
  });

Product View

Product view data is sent to DataLayer.

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

Add to cart and Remove from cart data is sent to DataLayer.

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
             }
             ]
          }
        }
 });

Add or Remove Favorites

Data is sent to the DataLayer when a product is added to or removed from the favorites.

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
     }
 });

Product Purchase

After the product is purchased, data is sent to the DataLayer.

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
             }
             ]
          }
        }
 });

PageView

The code that should be sent to DataLayer on all pages except the pages mentioned above in this document.

Parameters:

OM.uri (REQUIRED)

Sample data sent to DataLayer

dataLayer.push({
  event: "vlEvent",
  label: "VL-PageView"
 });

Custom Event

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.

Parameters

These parameters should be created by the Integration team on RMC 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
 });