Missing clicks in dynamic blocks
You may notice that clicks on dynamic blocks appear in your customer profile, but when you go to the Evaluate tab and use the Click Map feature, no clicks are displayed there.
This issue is influenced by several factors discussed in this article, which can help you make sure that clicks are tracked correctly or recognize when this behavior is expected.
In the example screenshot below, you'll see an email campaign that includes both a regular text link and a dynamic HTML block containing a table with an image embedded as a link.
In this case, users clicked both links several times, yet the click map still shows no clicks on the dynamic content block.
Example
Incorrect HTML syntax
This issue typically occurs due to errors in the HTML markup. The click map uses xpath to identify clicked elements; it represents a relative position of the element to the root of the document.
Incorrect HTML syntax prevents it from accurately detecting clicks, resulting in missing data in that section.
In this particular example, the table is considered invalid because it contains <td> elements directly, since table cells need to be placed inside <tr> (row) elements first.
For example, with an HTML markup like this:
Wrong syntax:
<table> <td> <a href="https://www.bloomreach.com/"> <img src="https://example.com"> </a> </td></table>
You need to ensure that the table has the correct syntax by enclosing the <td> table data tags within a table row tag <tr>.
Correct syntax:
<table><tr> <------ <td> <a href="https://www.bloomreach.com/"> <img src="https://example.com"> </a> </td></tr> <------</table>
After making this change to the dynamic content block in the example campaign, clicks begin appearing on dynamic blocks in the click map.
Note that any issue related to HTML syntax, not limited only to tables, can potentially lead to the problem described. The example provided above is intended to demonstrate how incorrect HTML syntax can impact the xpath. As a result, this can interfere with the accurate tracking of user clicks within the clickmap feature.
To resolve this issue, review the HTML structure to ensure it is correct and well-formed. By doing so, you can identify and fix any syntax errors that might be present.
Personalization that alters the email layout
The click map preview shows different email versions for each recipient, including personalized versions. Note that personalization may alter the email layout, so click counts can vary across previews of the same customer due to varying HTML structures.
For example, an email for customer profile A might look like this:
<html> <p> <a> example link </a> </p></html>
However, for customer profile B, it appears like this due to personalization:<html> <p> <p> <a> example link </a> </p> </p></html>
Because of the extra p element, the xpath For the example link, it will update from html>p>a to html>p>p>a. It means that certain clicks may or may not be visible, depending on the customer chosen for the preview.
Click map not rendering dynamic content due to the event Jinja
If your campaign uses Jinja conditions with trigger-event attributes, they won't appear in the click map because it doesn't support selecting a trigger event, unlike the test tab.
For example, consider an everyday use case: triggering a campaign event based on a specific event and using a display condition with event Jinja. In this case, the customer will only see the image if the trigger event's status attribute is set to "complete".
In the example, there’s a regular link without any display conditions or Jinja. Alongside, Jinja display condition is used with event.status ensuring that the image is shown to the customer only if the event has the specified attribute and value.
{% if event.status == complete %}
{% endif %}
The image appears correctly in the customer's email inbox and is clickable, with the click being recorded in the customer profile.
However, when reviewing the evaluate tab, neither the click nor the display condition appears in the profile preview.
It is because the evaluate tab can't access dynamic event properties fetched with Jinja; these are only available during the scenario's live execution.
Overview
Now you know what to check if clicks aren't showing on your click map:
- Incorrect HTML syntax, review the HTML structure to ensure it is correct and well-formed
- Personalization that changes the
xpathfor each customer, this can cause some clicks to be visible or hidden, depending on the selected customer in the preview. - The evaluate tab can't access dynamic event properties fetched with Jinja; these are only available during the scenario's live execution.