Support » Plugin: Google Analytics for WordPress by MonsterInsights » Download Tracking (Events) Not Working

Viewing 11 replies - 1 through 11 (of 11 total)
  • I am having this same issue-
    From what i’ve read, the event does not register if the link is loaded before the mouse button is released-

    supposedly this can be solved by changing the onClick to onMouseDown
    in the javascript for the event tracking, but aside from manually inserting it in your page with html, I believe the creator would have to update from his end.


    i’ve tried modifying the plugin via the dashboard
    plugins -> editor ->
    select plugin to edit “google analytics”
    and select google-analytics-for-wordpress/frontend/class-frontend.php
    find and replace all 8 instances of “onclick” with “onmousedown”

    and hit update file…

    it looks as though the source for all my pages is updated properly, but I have to wait 24 hours to see if the tracking is working properly- i’ll update you when i know

    I’m experiencing the same issue.

    I changed it to onMouseDown manually (chrome inspect element)

    Then used the RealTime view in Google Analytics.

    Popped up immediately.

    This was driving me nuts, I wish I would have found this a few hours sooner than I did, what a waste of time.. Thanks you two.

    EDIT: Works for me with the prescribed editor changes, thanks again.

    Thanks guys, you saved me from a headache! 🙂



    Hey guys,

    I have the same problem, I have a click to call button for telephone calls. I went into the editor and replaced all 8 instances of onclick with onmousedown, but when I inspect my click to call button I still see “onclick”.

    I’m running W3 Total cache so I tried disabling all caching and empty the cache but no luck. Any thoughts?


    Download the file from the server to your computer. Edit. Upload the modified file back to the server.
    The original file back up. If something went wrong.

    Ok I got the “onmousedown” changes implemented. Turns out you have to deactivate the plugin if you use the plugin editor. Then edit file. Then activate plugin.


    Download it to your computer (i can’t, don’t have FTP access at this company)

    What’s weird now is that not all links are tracked. For example we have three social links in a row. They are not buttons, just actual text links like this
    facebook link
    twitter link
    youtube link

    Nothing special. Just normal links. The only one that got tagged with the scrip is the youtube link.

    Also none of the links in the header or footer got tagged either.

    Can anyone point me in the right direction?


    We are experiencing the same issue when tracking Downloads in Google Analytics.

    On following the explicit instructions of ticking Track outbound clicks & downloads with an appropriate file from the default list of tracked file types, Events are not recorded in GA.

    However, when the Track downloads as pageviews option is selected, a virtual page view is recorded in GA. However this is not a preferred resolution.

    Thanks, looking forward to a response.

    Also having this issue since April 1, 2013. Download tracking was working before then.

    Will try the modification to google-analytics-for-wordpress/frontend/class-frontend.php but my own branch of the plugin is not an ideal solution.

    The suggested modification to class-frontend.php didn’t work for me. However, the following seemed to work;

    I have narrowed my issue down to only relative links. If I change the links on my site to include the http protocol as well as the domain, the tracking code is applied.

    Unfortunately, that is not a permanent solution, since I don’t want to use absolute links for my downloads, so I’ll have to figure out a solution for applying the tracking code to relative links.

    Hopefully that helps someone. Will post further solutions.

    Well, I did a little more reading, and it looks like relative URLs are actually bad practice. I was misinformed before, thinking that relative URLs were a good practice. Guess I’ll be changing my links. And I doubt Yoast has plans to update the plugin to resolve this.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Download Tracking (Events) Not Working’ is closed to new replies.