WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Google Analytics for WordPress] Facebook SexyBookMark problem (4 posts)

  1. egiethoorn
    Member
    Posted 4 years ago #

    I use GA plugin version 3.2.5 and SexyBookmarks plugin version 3.2.3.

    When I share a Facebook link within SexyBookmarks then I get a wrong onclick TAG for the Facebook share link like this one:

    onclick="javascript:pageTracker._trackPageview('/outbound/article/www.facebook.com'); window.open(this.href,"sharer','toolbar=0,status=0,width=626,height=436');

    In the onclick from SexyBookmark plugin places the GA plugin a minor fault, namely:
    (this.href,"sharer'

    The " causes now a javascript problem and I hope someone knows the answer for the lines 471 and 472 (from googleanalytics.php):
    if (preg_match('/onclick=[\'\"](.*?)[\'\"]/i', $matches[4]) > 0) {
    $matches[4] = preg_replace('/onclick=[\'\"](.*?)[\'\"]/i', 'onclick="' . $coolBit .' $1"', $matches[4]);
    }

  2. Josh Jones
    Member
    Posted 4 years ago #

    Hi egiethoorn,

    Try replacing line #72 of html-helpers.php (in sexybookmarks) with the following line:

    $onclick = ' onclick="window.open(this.href,\'sharer\',\'toolbar=0,status=0,width=626,height=436\'); return false;"';

  3. Josh Jones
    Member
    Posted 4 years ago #

    Oh wow, nevermind man... I completely misunderstood what you were trying to say apparently. Let me look into it.

  4. Josh Jones
    Member
    Posted 4 years ago #

    Well, the only thing I've found that fixes the issue in IE actually breaks it in the rest of the decent browsers.

    $onclick = ' onclick="window.open(this.href, sharer, toolbar=0,status=0,width=626,height=436); return false;"';

Topic Closed

This topic has been closed to new replies.

About this Topic