- This plugin uses google analytics to store test data.
- 此插件使用Google Analytics(分析)存储测试数据。 li>
- Data stored is Test Name and Test Version
- 存储的数据为测试名称和测试版本 li>
- The combination of Test Name and one Test Version Name must be less than 128 characters.
- 测试名称和一个测试版本名称的组合必须少于128个字符。
Otherwise _setCustomVar()
will not except all data.
否则, _setCustomVar() code>不会除外所有数据。 li>_setCustomVar()
is called just before firing _trackEvent()
to store test data.在触发 _trackEvent() code>存储测试数据之前,调用-
_setCustomVar() code>。 li>- Custom Variable applied to track event
_gaq.push(['_setCustomVar', 'Slot', 'AB: ' + 'Test Name', 'Version Name', 2]);
Slot = - 自定义变量,用于跟踪事件
_gaq.push(['_ setCustomVar','Slot','AB:'+'Test Name','Version Name',2]); code> Slot =Test Index
测试索引 li>
- Event sent
_gaq.push(['_trackEvent', 'AB Testing', 'Test View', 'Test Name & Version']);
- 事件已发送
_gaq.push(['_ trackEvent','AB Testing','Test View','Test Name&Version']); code> li>- Goals: It is up to you, the webmaster or analytics admin, to set the test goals in your analytics admin settings.
- 目标:网站管理员或分析管理员应自行决定在分析管理员设置中设置测试目标。 li>
- Do not run more than 5 A/B tests per visitor session.
- 每个访问者会话运行的A / B测试不要超过5个。
Otherwise analytics data will be overwritten or lost
否则分析数据将被覆盖或丢失 li>
ul>
Supports both versions of Google Analytics, old “_gaq” and new Universal “ga()”
支持两种版本的Google Analytics(分析),旧的“ _gaq”和新的通用“ ga()” p>
If you have Universal Analytics deployed on your site, you must
如果您在网站上部署了通用分析,则必须
provide a Custom Dimension key.
提供自定义维度键。
Follow these instructions to setup a custom dimension.
按照这些说明设置自定义维度。
Then, eadd the dimension to the plugin settings.
然后,将尺寸添加到插件设置中。 p>
Also, Universal Analytics users must use this (Custom Report)[https://www.google.com/analytics/web/template?uid=-O_F9EH4Qpil1mSt9l6U8A] to view test results (Universal Analytics only).
此外,Universal Analytics用户还必须使用此(自定义报告)[https://www.google.com/analytics/web/template?uid=-O_F9EH4Qpil1mSt9l6U8A]来查看测试结果(仅适用于Universal Analytics)。 p
>
>
Here's further reading about Google Analytics Custom Variables,
此处进一步介绍了Google Analytics(分析)自定义变量,
="https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide" rel="nofollow">Analytics Events, and Analytics Goals.
/ analytics / answer / 1032415?hl = zh_CN“ rel =” nofollow“>分析目标。 p>
When a visitor views a page with a given test running, we use “Session Level” events to track the test view, because this ensures the test data will carry through the session to the conversion goal.
当访问者在运行给定测试的情况下查看页面时,我们将使用“会话级别”事件来跟踪测试视图,因为这可以确保测试数据将整个会话带入转换目标。
From what I understand, “Page Level” custom variables will not work because we are firing an event after page load.
据我了解,“页面级”自定义变量将不起作用,因为我们在页面加载后触发了一个事件。
Therefore, because the event is fired in the middle of a session, we must use session level custom variables Read More Here
“ rel =” nofollow“>在此处了解更多信息 p>
A/B Split Test
A / B拆分测试 h3>
- All A/B tests are run by manipulating HTML/CSS DOM elements in your wordpress theme with javascript.
- 所有A / B测试都是通过使用javascript处理wordpress主题中的HTML / CSS DOM元素来运行的。 li>
- Depending on how many versions you are testing, all site traffic will be split evenly to show each test version.
- 根据要测试的版本数,所有站点访问量将平均分配以显示每个测试版本。 li>
- When a test version is run, the javascript you defined in the plugin admin will execute and show that variation to the user.
- 运行测试版本时,您将在插件管理中定义的javascript执行并向用户显示该版本。 li>
- No Server-Side scripting is used.
- 不使用服务器端脚本。 li>
- Any javascript library can be used in your A/B Test, given that you have loaded the library in your wordpress theme.
- 假设您已将JavaScript库加载到wordpress主题中,则可以在A / B测试中使用任何javascript库。 li>
ul>
Running An A/B Split Test
运行A / B拆分测试 h3>
After you have installed the plugin, in the wordpress admin, navigate to AB Testing
and click Create New Test
.
安装插件后,在wordpress管理员中,导航至 AB Testing code>,然后单击 Create New Test code>。Enter Test Name, each test Version’s Name, and enter your custom javascript in Version Code
and click Save Test
.
输入测试名称,每个测试版本的名称,然后在版本代码 code>中输入您的自定义JavaScript,然后点击保存测试 code>。Be sure to include your analytics=true
flag in all of your test version code snippets.
确保在所有测试版本代码段中都包含 analytics = true code>标志。 p>The combination of Test Name and one Test Version Name must be less than 128 characters.
测试名称和一个测试版本名称的组合必须少于128个字符。
This is because _setCustomVar
limits character length.
这是因为 _setCustomVar code>限制了字符长度。 p>Make sure your server /js/
directory and file /js/ab.js
have permissions 0755 or 0775 so PHP can write output to the ab.请确保您的服务器 / js / code>目录和文件 /js/ab.js code>的权限为0755或0775,以便PHP可以将输出写入 ab。 js
file.
js code>文件。 p>
When you are ready to start your test, click the checkbox Active
, which will write your new test to the js/ab.js
file and make your test live
准备开始测试时,请单击复选框 Active code>,这会将您的新测试写入 js / ab.js code>文件并使测试生效to your site visitors.
给您的网站访问者。 p>
And don’t forget to update any cached versions of js/ab.js
.
并且不要忘记更新 js / ab.js code>的任何缓存版本。 p>Example Test Version Code
示例测试版本代码 h3>
First, decide what elements in your theme HTML you want to test.
首先,确定主题HTML中要测试的元素。
Because your js/ab.js
file is included globally into your theme, your A/B test code will manipulate any DOM elements that meet its conditions.
因为您的 js / ab.js code>文件是全局包含在主题中的,所以您的A / B测试代码将操纵符合其条件的所有DOM元素。 p>Therefore, do not run tests on general elements like
or
unless you want to test these changes site wide.
因此,除非要在站点范围内测试这些更改,否则请勿对 code>或