Title: WP Content Experiments &amp; Event Tracking
Author: wpsolutions
Published: <strong>2012 年 10 月 6 日</strong>
Last modified: 2012 年 10 月 6 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/wp-content-experiments-event-tracking.
svg)

# WP Content Experiments & Event Tracking

 作者：[wpsolutions](https://profiles.wordpress.org/wpsolutions/)

[下载](https://downloads.wordpress.org/plugin/wp-content-experiments-event-tracking.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-content-experiments-event-tracking/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-content-experiments-event-tracking/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-content-experiments-event-tracking/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-content-experiments-event-tracking/#developers)

 [支持](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/)

## 描述

The WP Content Experiments & Event Tracking plugin gives you the ability to conduct
Content Experiments on your WordPress site by providing an easy interface which 
you can use to paste the relevant google experiments control code into the header
of the page/post of your choice.

Google Content Experiments replaces Google Website Optimizer as the tool which website
owners can
 use for the split testing of their site’s pages. Content Experiments
is a tool which can found in your Google Analytics account from which you can do
your split testing with.

This plugin also gives you the ability to perform event tracking on certain page
elements such as buttons, links or other elements.
 The plugin will automatically
add the event tracking code to particular elements on the wordpress post/page of
your choice based on the configuration in the post/page editor window.

### 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: https://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

1) Using the WP editor open the page or post you wish to treat as the “Original”
page for the content experiment you want to perform.
 Please see the google help
pages for how to setup/run experiments: https://support.google.com/analytics/bin/
answer.py?hl=en&answer=1745216

2) Enable the checkbox in the “Content Experiments For WP” section to activate the
feature

3) Paste the Google Content Experiments code into the text box.

IMPORTANT: You should only paste the content experiments code in the page which 
you set as the “Original” in the experiments setup of your google analytics account,

ie, do not paste the code in the “Variation” page(s). You can check whether your
code was added correctly within the page’s tags by viewing the source of the web
page.

Adding google event tracking code to an element on 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](http://www.yourdomain.com/somepage)

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”)

## 屏幕截图

 * [[

## 安装

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: https://wordpress.org/extend/plugins/google-analytics-for-
wordpress/

 1. Upload the `wp-content-experiments` folder to the `/wp-content/plugins/` directory
 2. Activate the WP Content Experiments plugin through the ‘Plugins’ menu in WordPress

## 常见问题

  Do I need a Google Analytics account in order to use Content Experiments?

Yes. You will need to create an account by going here:
 http://www.google.com/analytics/

  How do I setup a content experiment?

Google has a wealth of information and help documentation about Content Experiments.

See the following to learn more: http://support.google.com/analytics/bin/answer.
py?hl=en&answer=1745147

Also go here for some setup information:
 http://support.google.com/analytics/bin/
answer.py?hl=en&answer=1745216

## 评价

此插件暂无评价。

## 贡献者及开发者

「WP Content Experiments & Event Tracking」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ wpsolutions ](https://profiles.wordpress.org/wpsolutions/)

[帮助将「WP Content Experiments & Event Tracking」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-content-experiments-event-tracking)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-content-experiments-event-tracking/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/wp-content-experiments-event-tracking/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/wp-content-experiments-event-tracking/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-content-experiments-event-tracking/)。

## 更新日志

#### 1.1

 * oops…had to resubmit because my readme.txt file had mistake

#### 1.0

 * Initial release

## 额外信息

 *  版本 **1.0**
 *  最后更新：**14 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 3.4.0 或更高版本 **
 *  已测试的最高版本为 **3.4.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-content-experiments-event-tracking/)
 * 标签
 * [a/b testing](https://cn.wordpress.org/plugins/tags/ab-testing/)[event tracking](https://cn.wordpress.org/plugins/tags/event-tracking/)
   [google analytics](https://cn.wordpress.org/plugins/tags/google-analytics/)[split testing](https://cn.wordpress.org/plugins/tags/split-testing/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-content-experiments-event-tracking/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/reviews/)

## 贡献者

 *   [ wpsolutions ](https://profiles.wordpress.org/wpsolutions/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-content-experiments-event-tracking/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.wpsolutions-hq.com/)