• **Summary**

    We’re having an issue with click events not registering in Google Analytics. Specifically, any time we have an IMG element wrapped in an A element that has data- attributes, the click event appears in the realtime bar chart but does not show up in the list of events. Links with no HTML inside them do appear in the list of events.

    **Preconditions**
    – This plugin installed and a GTM account configured
    – We assume we are using the default GTM configuration (we inherited the site)
    – You have a site with the following HTML

    <a href="https://mysite.com" data-category="Link Tracking" data-label="External Link" data-action="Clicked an external link">
        See my other page
    </a>
    
    <a href="https://mysite.com" data-category="Link Tracking" data-label="External Link" data-action="Clicked an external link image">
        <img src="images/see-my-other-page.jpg" />
    </a>

    **Steps to Reproduce**
    1. Open page in a browser
    2. Click the first link (no image)
    3. Click event appears in realtime activity and in the list of events
    4. Click the second link (with an image)

    **Expected Result**
    – Click event appears in realtime activity
    – Click event is added to the list of events below the realtime activity

    **Actual Result**
    – Click event appears in realtime activity
    – Click event is NOT added to the list of events below the realtime activity

    **Workaround**
    – None known but I’ve considered adding the click event via JavaScript rather than using data attributes

    Please note: I do not think this is a bug with this plugin but I am new to the plugin so maybe it is, or maybe it is just a configuration issue.

    All help really appreciated.

    Kind regards,

    Ted Stresen-Reuter

Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi Ted,

    Sorry for this late reply.

    I do not see any reason for those click not being tracked but if you have any specific site where I can test this, I am happy to have a look.

    If the event shows up in the real time report, that means that this does not sounds like a tracking issue since the data is somehow reaching Google’s servers. If the final event reports does not include this data, I would check the filters that has been applied to the GA view.

Viewing 1 replies (of 1 total)
  • The topic ‘IMG elements wrapped in A elements don’t register click events’ is closed to new replies.