What is “Track dynamic selector”?
Suppose you have a website which contains similar IDs but for different elements or have dynamically generating IDs, particularly in e-commerce based sites, Freshmarketer provides you with Track dynamic selector option which aids in tracking clicks intelligently on those specific elements that have dynamically changing attributes.
Before using “Track dynamic selector”:
All clicks are directed to a single element because of similar ID is given to all the elements.
After using “Track dynamic selector”
Clicks are spread pertaining to the respective elements.
This option works by allowing you to enter specific condition for the experiment to rule out from taking into consideration for the experiment.
- When a visitor clicks the 3rd item from the list of top 5 best selling items, but instead, the heatmaps misinterpret that the click is made on the 1st item since all the 5 items have a similar ID - “product_image”. For this scenario, you can use Track dynamic selector option to specify “product_image” as the excluding selector. Now, Freshmarketer automatically tracks and excludes the elements with this ID. Now, it takes the next hierarchical element to the ID which differentiates those 5 items.
- When the scrolling banner in websites generates ID dynamically. You can use Track dynamic selector option to exclude this dynamically changing attributes.
How to create an experiment using “Track dynamic selector” option?
The steps given below explains how to use Track dynamic selector option for your experiment.
In the URL tab of the heatmap experiment page, click “Advanced options”. Now, “Track dynamic selector” option is revealed.
Locating "Track Dynamic Selector"
Under “Track dynamic selector”, there will be two drop-down boxes and a text box. The first drop-down box lets you select between ID and Class.
The subsequent drop-down box gives you a choice between Contains and Regex. While the former is useful when you want to specify certain text or string as the excluding condition, the later is suitable when you want to cite a regular expression.
The text box allows you to enter the condition that you want Freshmarketer to track dynamically and ignore.
Example 1 - Using “ID”
Track Dynamic Selector: Using "ID"
Track Dynamic Selector: Using "Class"