Results 1 to 6 of 6

Google Analytics Code Breaks Javascript Links

This is a discussion on Google Analytics Code Breaks Javascript Links within the Bug Reporting forums, part of the vBSEO SEO Plugin category; I have a html in my page: Code: <a href="javascript :rate(8)">Rate Link</a> VBSeo is changing it to: Code: <a onclick="urchinTracker ...

  1. #1
    Junior Member
    Real Name
    Tom A
    Join Date
    Aug 2006
    Posts
    14
    Liked
    0 times

    Google Analytics Code Breaks Javascript Links

    I have a html in my page:
    Code:
    <a href="javascript:rate(8)">Rate Link</a>
    VBSeo is changing it to:
    Code:
    <a onclick="urchinTracker ('/outgoing/javascript_rate_8');" href="javascript:rate(8)">Rate Link</a>
    The change is causing the function rate() to not execute. I have observed this behavior in both IE and Firefox.

    Is there a way to disable the parsing of links beginning with "javascript:" ???

  2. #2
    Junior Member
    Real Name
    Tom A
    Join Date
    Aug 2006
    Posts
    14
    Liked
    0 times
    For reference, making the link the following does make it work, however, I'm sure the above 'bug' isn't the intended behavior.

    Code:
    <a onclick="javascript:rate(8)" href="javascript:rate(8)">Rate Link</a>

  3. #3
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    href="javascript:" style links are depreciated and should not be used.
    it should be called from the on_____ (click, mouseover, etc) event handler, with a return false; statement, along with an alternative href="page.html" of some sort for those without js or js diabled.

    so,

    Code:
    <a onclick="rate(8); return false;" href="rate.php?rating=8">Rate Link</a>
    is the proper way to do this.



    [/code]

  4. #4
    Junior Member
    Real Name
    Tom A
    Join Date
    Aug 2006
    Posts
    14
    Liked
    0 times
    This code line appears in the latest release of the VBA Links software package, which is my reason for posting it here. I'm sure users will be coming here mentioning the interference. Just an FYI. Thank you for your quick response.

  5. #5
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    don't get me started on vba... lol

    thanks for the heads up.

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Thank you for reporting!
    /* NOTE: This issue has been resolved. The fix will be distributed with the next vBSEO build. */

Similar Threads

  1. Got My Google Analytics code today
    By shanemcse in forum Analysis: Traffic & SERPS
    Replies: 10
    Last Post: 11-14-2006, 11:07 PM
  2. vBSEO 2.4.0 Released - Includes Google AdSense Targeting Feature!
    By Juan Muriente in forum vBSEO Announcements
    Replies: 74
    Last Post: 05-20-2006, 09:29 PM
  3. Google Analytics Code dont work?
    By Schahab in forum General Discussion
    Replies: 3
    Last Post: 02-24-2006, 05:41 AM
  4. Finding my Google Analytics Code
    By Michael in forum Troubleshooting
    Replies: 1
    Last Post: 11-21-2005, 03:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •