Question

I have a problem where I cannot put analytic code on my struts html:link tag. The code won't render if I put a data-analytics attribute on like this:

<html:link styleClass="analytics-click"
           action="${globalSites_context}${forgotPasswordAction}"
           title="${forgotPasswordLink}"
           data-analytics='{"location":"BrandBar","description":"BrandBar forget password"}'>${forgotPasswordLink}
</html:link> 

What can I do?

Was it helpful?

Solution

Change code to plain HTML

<a class="analytics-click"
   href="${globalSites_context}${forgotPasswordAction}"
   title="${forgotPasswordLink}"
   data-analytics='{"location":"BrandBar","description":"BrandBar forget password"}'>${forgotPasswordLink}
</a>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top