Re: Adding an output buffer callback

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Adding an output buffer callback

by Michael Toppa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> One of the features of Google Analytics and GA plugins is the ability
> to track outgoing links using this technique
> http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527
> .
>
> I reviewed the various GA plugins and saw that they only run their
> preg_match_replace inside a filter hook on the_content, the_excerpt
> and comment_text.  This means they don't track outbound links on the
> theme, the widgets, and the output of plugins.
One of the most common support issues I have with my Shashin (Picasa
photo viewer) plugin is conflicts with Google Analytics plugins, so at
least some of them do in fact interfere with the output of other
plugins. My plugin creates links with onclicks to enable the photo
viewer, and at least some of the GA plugins blithely overwrite those
onclicks with their own, breaking my plugin. Please keep this in mind
when working on your plugin - check for an existing onclick before
creating one. You can probably add your instructions to the end of an
existing onclick, but please test it first.

Thanks,

Mike T
http://www.toppa.com
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Adding an output buffer callback

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
>  One of the most common support issues I have with my Shashin (Picasa photo
> viewer) plugin is conflicts with Google Analytics plugins, so at least some
> of them do in fact interfere with the output of other plugins. My plugin
> creates links with onclicks to enable the photo viewer, and at least some of
> the GA plugins blithely overwrite those onclicks with their own, breaking my
> plugin. Please keep this in mind when working on your plugin - check for an
> existing onclick before creating one. You can probably add your instructions
> to the end of an existing onclick, but please test it first.
>

That's a prime example for why un-obtrusive javascript is better:

Both plugins should attach onClick handlers using jQuery:

jQuery('a').click(yourEventHandler);


--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Adding an output buffer callback

by William Canino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I reviewed the various GA plugins and saw that they only run their
> preg_match_replace inside a filter hook on the_content, the_excerpt
> and comment_text.  This means they don't track outbound links on the
> theme, the widgets, and the output of plugins.

Michael, "Ultimate Google Analytics",  "WP Google Analytics" and the
"Google Analytics for WordPress" plugins all use preg_match_replace
and do overwrite onclicks.  Meanwhile, "Google Analyticator" uses
jQuery.click().  Finally, Sylvestre's "Google Analytics" doesn't track
outbound links.  These are all the GA plugins out there.

Thank you for your help, guys. Google Analyticator solves all my
concerns.  Thank you, Spiral Web Consulting.

Almost all = I need to tweak it to track my feed clicks.



2009/11/2 Michael Toppa <public@...>:

> One of the most common support issues I have with my Shashin (Picasa photo
> viewer) plugin is conflicts with Google Analytics plugins, so at least some
> of them do in fact interfere with the output of other plugins. My plugin
> creates links with onclicks to enable the photo viewer, and at least some of
> the GA plugins blithely overwrite those onclicks with their own, breaking my
> plugin. Please keep this in mind when working on your plugin - check for an
> existing onclick before creating one. You can probably add your instructions
> to the end of an existing onclick, but please test it first.
>
> Thanks,
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Adding an output buffer callback

by Eric Marden-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov 2, 2009, at 11:24 AM, William Canino wrote:

> Almost all = I need to tweak it to track my feed clicks.


Consider FeedBurner.com for additional stats on feed usage, too.


- Eric Marden
__________________________________
http://xentek.net/code/wordpress/





_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers