To initialize the teaser elements, you need the object wt_ttv2. You can mark the teaser elements to be measured by adding the configurations to the array wt_ttv2.

The configuration for a teaser element is divided into

  • selector
  • shadowRoot
  • exclude
  • data
  • conversion

Example

window.wt_ttv2 = window.wt_ttv2 || [];
window.wt_ttv2.push(
	{
        selector: "li.item:nth-of-type(2)",
        shadowRoot: "#women-collection",
        exclude: [
        	"li.item:nth-of-type(2) a:last-child"
        ],
        data: {
        	name: "New Women Collection",
        	rank: "Main Page Banner",
        	content: "Women Collection",
        	variant: "campaign"
        }, 
        conversion: {
        	type: "view",
        	goal: "order",
        	value: "10%"
        }
    }
);
JS
ParameterDescription
selector

Enter the teaser element to be measured.

You can either pass this directly as HTML element or pass the CSS selector of the element. Within the teaser element, all links, areas, buttons, and input fields of the type "submit" are marked for teaser click tracking.

shadowRootIf your teaser element is inside a shadow DOM element, specify the CSS selector of the shadow DOM element. If you have defined a CSS selector as the "selector", it will refer to the "shadowRoot" selector you have defined.
exclude

Define teaser links or teaser buttons for which no teaser click is to be measured. You can either pass them directly as HTML elements or you can pass the CSS selectors of the element.

data

Specify the information of the teaser element using the following values:

ValueDescription
name         Mandatory. Specify the teaser name.
rank                Mandatory. Specify the teaser placement.
contentSpecify the teaser content.
variantSpecify the teaser variant.
conversion

Specify how the teaser is to be assigned to the conversion or Web page target. You can set the following values:

ValueDescription
type               

Conversion type (default = product).

  • view: The teaser should be assigned to the conversion or website target as soon as it has been viewed.
  • click: The teaser should be assigned to the conversion or website target as soon as it is clicked.
  • product: The teaser should be assigned to the conversion or website target once it has been clicked and the teaser name matches the product name.

goal

Conversion goal (default = both)

  • order: The teaser should only be sent during a conversion.
  • goal: The teaser should only be sent on a website target.
  • both: The teaser should be sent during a conversion or a website target.

value

Conversion value (default = The teaser gets the same value as the product)

  • Percentage of the purchase order: The teaser gets a percentage of the purchase order value (for example, 5%).
  • Fixed value: The teaser gets a fixed value (for example, 15).