Contentsquare associates user interactions, such as clicks and hovers, with the correct site element using targets. Targets are generated for each site element based on that element’s HTML path, making each one unique.
These unique targets act as a link between user interaction data (e.g. clicks) and a site element (e.g. a banner).
Example:
- A banner has a target generated from its HTML path.
- A user clicks on that banner.
- The click and the banner are associated via the target.
- Contentsquare displays accurate click rates for the banner.
If your site’s HTML code changes, an element(s)’ HTML path and therefore target may be affected by that change too, breaking the association. The Contentsquare features that may be affected are those relying on in-page interaction.
Why am I not seeing the same data as my teammate?
Sometimes it can be because two different site elements are associated with the same target, or that one site element is associated with two different targets.
Two different site elements associated with the same target
If a page has several page layouts and URLs, the varying position of the site elements, or the presence of different site elements on each page, can affect the HTML. For example, temporary content (such as a temporary banner or an added element during an A/B test) can alter the layout of a page. This can cause one target to be associated with two different elements.
However, in the majority of cases, Contentsquare displays the correct data when temporary content is present.
One target is associated with two different elements on two different page layouts. This happens because the right layout has an added banner that affects its HTML.
One site element associated with two different targets
If the id of a site element changes, it can happen that two targets become associated with that element. This can cause the data to vary for one site element across different URLs (for the same page).
The banner id has changed, causing two targets to be associated with the same banner.
Solution
If you are experiencing this issue, please contact your CSM or submit a support ticket. You can also work with your IT team to build a specific identifier for a site element using the data-attribute “data-cs-override-id”. This will allow Contentsquare to always recognize the element with a specific target, no matter where the element is positioned.