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?

Était-ce utile?

La 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>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top