Wunderkind reads elements across your site in order to deploy experiences on your website and in email. If the HTML or javascript structure of any of the elements we’re tracking changes over time, we will need to update our integration accordingly. For a more stable long-term integration, we recommend creating a window object exposing the elements below, for Wunderkind to use in our tracking instead of HTML elements. The most important elements have an asterisk*
Once you have created the window object, please let your Wunderkind point of contact know what it’s called.
Tracking Element | Description | Pages where tracking is needed | Example window object name and value |
Product exclusion | If applicable, provide an indicator that a product should be excluded from Wunderkind emails. | Product pages | wunderkind.product.exclusion: true |
Item id | Unique identifier of a product, independent of size/color/attribute selection | Product pages | wunderkind.product.id: “12345” |
Sku | Product identifier drilling down to the specific size/color/attribute selection | Product pages | wunderkind.product.sku: “ABCDE” |
Product name* | Name of the product that you would want to display in emails. | Product pages | wunderkind.product.name: “Striped Dress” |
URL (canonical) | URL that will always link back to the item. It should not include any extraneous tracking parameters. | Product pages |
wunderkind.product.url: “https://www.website.com/dresses /striped” |
Image URL* | URL for the primary product image. This will be the image utilized in our email campaigns. | Product pages |
wunderkind.product.imgUrl: “https://www.asset.website.com /dresses/striped.png” |
Price* | The current price of the product (eg, if a product is on sale, this would be the sale price) | Product pages | wunderkind.product.price: 150 |
In stock* | Identifier to determine if an item is in stock or not. Returns true or false. | Product pages | wunderkind.product.inStock: true |
Item category* | The category of the item, in relation to other items. Used for showing recommended products in the same category. Eg, dresses, tops, pants. | Product Pages |
wunderkind.product.itemCategory: “dress” |
Category ids | An array of item ids on the category page. Category pages are any page with multiple products on them. Category ids should match the id found on the product page. | Category pages | wunderkind.category.categoryIds: (2) ['12345', '67891’] |
Category title | The human readable title of the category page. Should match the item category found on the product page. Eg, dresses, tops, pants | Category pages | wunderkind.category.title: “Dresses” |
Cart quantity | Number of items are currently in the user's cart. Make sure the value is available across all pages. | All pages | wunderkind.cart.quantity: 2 |
Cart value | Current dollar value in cart, should return numeric value only. | All pages | wunderkind.cart.value: 300 |
Email address | Email address of a logged in user. We recommend encoding email address with ASCII to binary, however we do support email address as plain text. If you're unsure, please consult with your legal team. | All pages |
wunderkind.user.email: “bGFkYXRlc3RAZ21haWwuY29t” |
Website Tracking Object, Example Output
The window object you set up should use actual data from your website. When properly implemented, it may look like the below result, on an example client’s product page.
Note: Do not cut and paste this information for your own implementation. It is intended for display purposes only. The code you implement should reference the appropriate values from your e-commerce platform.