I’m just going to track my own progress on this hoping to either figure it out or someone else jumps in.
FWIW my website is designed in Xara.
I can see that I can add manual events or content tracking. For my purposes I’d like to track all clicks on the buttons, as well as see which answers are being displayed on the screen.
Here’s an example of one of the blocks I want to track and the link. Its a picture with text on top.
<a href="#xl_AnsBookUltrasound" onclick="xr_tip(this);return(xr_nn());" data-track-content data-content-name="UltrasoundBookTest2">
<img class="xr_rn_ xr_rnsp_ xr_ap" src="index_htm_files/4128.png" alt="" title="" onmousemove="xr_mo(this,128,event)" style="left:90px;top:1525px;width:501px;height:62px;"/>
<div class="xr_txt Normal_text xr_s33" style="position: absolute; left:118px; top:1558px; width:442px; height:10px;">
<span class="xr_tl Normal_text xr_s33" style="top: -21px;"><a href="#xl_AnsBookUltrasound" onclick="xr_tip(this);return(xr_nn());" onmousemove="xr_mo(this,128)" data-track-content data-content-name="UltrasoundBookTest3">Do I need to book for ultrasound?</a></span>
As you can see I’ve added in the data-track-content and data-content-name attributes. The impressions work correctly, however the interaction rate is 0 - ie, the click is not being captured. I have managed to capture clicks separately by using :
onclick="_paq.push(['trackEvent', 'TestCat', 'TestAction', 'TestName']);xr_tip(this);return(xr_nn());"
Which works. From what I can see at this point I’m going to have to add a script to each page to go and hunt out the blocks/links and manually add the relevent matomo code? This seems like a fairly complex solution to basic functionality - am I missing something?