WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Download Tracking (Events) Not Working (12 posts)

  1. wrylilt
    Member
    Posted 1 year ago #

    Our Website: http://empoweryourpage.com

    We are attempting to track downloads using this plugin - we've ticked the box in the settings, and outbound link clicks seem to track fine. However downloads don't track.

    Any idea why, or how to fix this? Thanks

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

  2. doublemilkplus
    Member
    Posted 1 year ago #

    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.

    details: http://www.cardinalpath.com/experiment-onclick-vs-onmousedown-event-tracking-in-google-analytics/

  3. doublemilkplus
    Member
    Posted 1 year ago #

    ok,
    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

  4. LLF
    Member
    Posted 1 year ago #

    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.

  5. onesork
    Member
    Posted 1 year ago #

    Thanks guys, you saved me from a headache! :)

  6. cnbscene
    Member
    Posted 9 months ago #

    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?

    Thanks!

  7. hamil1
    Member
    Posted 8 months ago #

    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.

  8. cnbscene
    Member
    Posted 8 months ago #

    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.

    OR

    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?

    Thanks

  9. connectisl
    Member
    Posted 8 months ago #

    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.

  10. Josiah Sprague
    Member
    Posted 7 months ago #

    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.

  11. Josiah Sprague
    Member
    Posted 7 months ago #

    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.

  12. Josiah Sprague
    Member
    Posted 7 months ago #

    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.

    http://yoast.com/relative-urls-issues/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic