Hi, I have been trying to find an answer to this question, but I can't seem to get this working as describe. I've followed the demo site usage, i.e.
Code: Select all
<blc:googleAnalytics ordernumber="${order?.orderNumber}" />
<script th:utext="${analytics}"></script>
And I've got a webPropertyId set, however the processor seems to fail to set an ${analytics} that's accessible in scope when the page is generated. I've debugged the processor and it does actually seem to set this variable, but the finished output simply has an empty script block.
I can test for ${analytics} in the page and can confirm that thymeleaf believes it's null. I'm going to keep digging into thymeleaf to see if I can get to the bottom of it but thought I'd pose the question in case anyone has had a similar issue.
I'm on 3.1.2. Note it didn't work in 3.1.1 either.