WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Could a filter be added for custom outbound tracking? (1 post)

  1. Simon Blackbourn
    Member
    Posted 3 years ago #

    Hi Yoast

    Would it be possible for a filter to be made available so that additional outbound links (i.e. ones that are not in the content or comments, etc) can be tracked as events?

    e.g. I have banner ads at the top of a website, it would be great if I could do something like:

    echo apply_filters( 'google_analytics', '<a href="blah.com"><img src="blah.jpg"></a>', 'outbound-ad' );

    which would add event tracking with the name of outbound-ad to my link.

    I know I can use the_content as you have added a filter to that, but that limits me to the outbound-article event, and there may be instances where I don't necessarily want to run all the content filters on something, so having just an analytics one would be much more efficient.

    Is this is a possibility?

    Many thanks
    Simon

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Simon Blackbourn
  • This topic is not resolved
  • WordPress version: 3.0.3