Tags
Tags are strings that can be associated with a specific visit/session.
Unlike events, tags are unique per session (i.e. can not have duplicate tags), are simple strings of a length of maximum 128 characters.
Tags can be used to quickly filter/segment data.
Example
// Call this when the scrollbar reaches the end
WPLY.addTag('scrolled_to_footer')
// Call this when user adds an item to the basket
WPLY.addTag('add_to_basket_timestamp: ' + Date.now())
Instructions
- Sometimes you might want to save additional data for each tracked user (such as username or whether they clicked a button or not).
- To add a tag, the function WPLY.addTag() is provided. It has only one parameter, which is the tag value. For example, after calling this: WPLY.addTag("username_John")The tag will be saved for the current recording, and you will be able to find it more easily.
You can also use a HTML5 data attribute to track clicks on specific elements using data-wply-click-tag, for example:
<a href="checkout.html" data-wply-click-tag="checkout">My checkout link</a>
Last modified 9mo ago