WordPress.org

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Content Experiments & Event Tracking

This plugin enables you to easily add Google Content Experiments control code and/or event tracking into your WordPress pages and posts.

Usage

pre-requisites: a) You will need an active google analytics account. If you don't have one, you can create a new one here: http://www.google.com/analytics/

b) You will need to have installed and configured the Google Analytics for WordPress plugin which can be found here: http://wordpress.org/extend/plugins/google-analytics-for-wordpress/ (this will ensure that your Google Analytics tracking code will be inserted inside your site's tags)

Adding Content Experiments code to a post or page

=

=========================================================== NOTE: To perform event tracking you will need to set up a goal in your google analytics account. Please see the google help pages: http://support.google.com/analytics/bin/answer.py?hl=en&answer=1032415

1) Using the WP editor open the page or post you wish to perform event tracking on.

2) Enable the checkbox called "Enable Event Tracking for this page" in the "Event Tracking" section to activate the feature

3) Enter the values for the Category, Action and Label fields. (These values should have been set by you when you were configuring youyr goal in you google analytics account)

4) Enter either a CSS ID name and/or CSS classname of the element you wish to track.

In order to obtain the CSS ID or class values of an element you can use firebug by right-clicking on the element and choosing "Inspect element with firebug".

Example 1: Let's say I had a link on one of my wordpress pages which I wanted to track and the html for my link looks like the following:

click me

I would enter "my_link_id" in the Element ID field in order perform event tracking on this link.

Example 2: If I had a button which I wanted to track and the html for this button looks like the following:

In order to track this button, I would simply copy the class value "coolbutton-submit" and paste it into the "Element Classname" field.

Tip: You can check whether your event tracking code was added correctly to the appropriate element by viewing it in firebug by rightclicking the element and selecting "Inspect Element with Firebugt" when using the Firefix browser. (Alternatively if you are using Chrome right-click the element and select "Inspect element")

Requires: 3.4.0 or higher
Compatible up to: 3.4.2
Last Updated: 2012-10-6
Active Installs: 600+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.