开发者 |
firebrandllc
lonkoenig |
---|---|
更新时间 | 2019年12月28日 00:05 |
捐献地址: | 去捐款 |
PHP版本: | 5.3.3 及以上 |
WordPress版本: | 4.8 |
版权: | GPLv2 |
版权网址: | 版权信息 |
Google Optimize is the free, preferred way to run experiments. Analytics Content Experiments remain available but are being deprecated in the future. We are currently supporting this plugin, but will discontinue support as the Content Experiments API becomes deprecated.In the simple (page) form of Google Experiments, the user is redirected to a separate page which contains the variation. There are a number of plugins that can help you implement this scheme. The Simple Content Experiments plugin implements the "Client-side" model described in Content Experiments Without Redirects (Browser-only implementation) This scheme is more complicated to set up, but allows more flexibility. The Simple Content Experiments plugin allows you to define sections within a single page that contain multiple variations with simple shortcodes.. For example, you can test if one call-to-action image gets more clicks than another. To use this plugin, you will need:
[experiment id="EXPERIMENT ID"]
[ex_variant]
content for first variation
[/ex_variant]
[ex_variant]
content for second variation
[/ex_variant]
[/experiment]
Features:
php
/** Enable console log debugging messages for the Simple Content Experiments plugin: */
define('WPSCE_DEBUG', true);
Google Tag Manager
As simple as "Simple Content Experiments" is, Google Optimize is even simpler. And the recommended solution if you're running GTM.
But if you still want to use the old Content Experiments, you can. (For now.)
When running Google Tag Manager, sometimes the Experiments API will run before Analytics is loaded and ready.
Don't worry if that is just programmer-speak, you just need to add a new Tag and Trigger.
Obviously, none of this applies if you're not running Tag Manager.
Trigger
Name:
I called mine "AnalyticsLoaded" but you can name it whatever you want.
Choose Event:
"Page View"
Configure Trigger:
"Window Loaded"
Fire On:
"All Page Views"
Tag
Name:
Whatever you want. I called mine "SimpleExperimentPlugin"
Choose Product:
"Custom HTML" tag
Configure Tag:
```html
if("function" == typeof(content_experiment.run_experiment)){
content_experiment.run_experiment();
}
```
Fire On:
"AnalyticsLoaded" or whatever you named the trigger above.
This version of the plugin only supports in-page variations. There are other plugins that offer the whole page option.
Yes. (Sort of)
Each variation is wrapped in a <div>
and all of unused variations are removed via JavaScript/jQuery.
Make sure the plugin is activated. If you're running an experiment outside the regular Post/Page content, please describe where you're putting the experiment in the support forum.
You can use the shortcodes to create variant content within a text widget. The current version does not have built-in mechanisms for swapping whole widgets or sidebars.
Yes, but it's probably more complicated than you think... You can define more than one experiment on a page. But unless your experiments are completely independent, they will skew each other's results and make the results Google generates incorrect. Our solution is to only run one experiment per user per page view.