=== Simple Content Experiments === Contributors: firebrandllc, lonkoenig Donate link: http://firebrand.net Tags: testing, google, content experiments, a/b testing Requires at least: 3.2.1 Tested up to: 4.5 Stable tag: 2.4 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html Use Google Experiments to test content variations within a single page using simple shortcodes. == Description == **Simple Content Experiments** creates shortcodes you can use to create variations for Google Experiments. It also handles the communication with the Content Experiments API to select variations and report results. In the simple (page) form of Google Experiments, the user is redirected to a separate page which contains the variation. The Simple Content Experiments plugin allows you to define sections within a single page that contain multiple variations. For example, you can test if one call-to-action image gets more clicks than another. This plugin implements the "Client-side" model described in [Content Experiments Without Redirects (Browser-only implementation)](https://developers.google.com/analytics/solutions/experiments-client-side) To use this plugin, you will need: 1. Google Universal Analytics installed on your site 1. [A Content Experiment](https://developers.google.com/analytics/solutions/experiments-client-side#define) 1. Your experiment ID (Will be displayed when setting up the experiment above.) Sample content experiment: ` [experiment id="EXPERIMENT ID"] [ex_variant] content for first variation [/ex_variant] [ex_variant] content for second variation [/ex_variant] [/experiment] ` ## Features: * Allows in-page variations. You don't need to create a whole page for each variation * Simple shortcode syntax * Uses Google Experiments API to determine which user sees which variation * Adds class ("xvariantclick") and custom data attribute ("data-xvariant") which can be used for Analytics event goals and tracking ## Goals and Tracking: Anchors within an experiment variation get an additional class: "xvariantclick" This class can be used with Google Tag Manager to create a rule that responds to clicks on those elements. ### If You Wish to Use Google Tag Manager: 1. Make sure you have an Click Listener tag 1. Create a macro to get the experiment variation number 1. Name: name it something like "experiment_variant" 1. Macro Type: Data Layer Variable 1. Data Layer Variable Name: "gtm.element.dataset.xvariant" 1. Data Layer Version: version 2 1. Default Value: 0 1. Create a firing rule 1. Rule Name: "xvariantclick" 1. Conditions 1. {{event}} equals gtm.click 1. {{element classes}} contains xvariantclick 1. Create an event tag for these experiment clicks: 1. Name: name it something like "Experiments Events" 1. Tag Type: Universal Analytics 1. Track Type: event 1. Event Tracking Parameters (all are optional, these are sample values) 1. Category: "experiment" 1. Action: "click" 1. Label: blank 1. Value: {{experiment_variant}} 1. Firing Rules: xvariantclick ###Google Analytics Experiments: To track clicked items within an experiment, use these new events in your goal definitions. You can look for an event where Category = "experiment" or whatever you named your category above. == Installation == ###Install from WordPress.org 1. Log into your website administrator panel 1. Go to Plugins page and select "Add New" 1. Search for "Simple Content Experiments" 1. Click "Install Now" on the Content Experiments entry 1. Click Activate Plugin ###Install via ftp 1. Download the plugin zip file using the button above 1. Log into your website administrator panel 1. Go to Plugins page and select "Add New" 1. Click "Upload" 1. Choose your recently downloaded zip file 1. Click the Install Now button 1. Click Activate Plugin == Requirements == + Google Analytics (Universal Analytics) + This version of the plugin requires jQuery 1.6 or higher. While jQuery is probably already available in your theme, in the unlikely event that it isn't, you can use a plugin like [WP jQuery Plus](https://wordpress.org/plugins/wp-jquery-plus/) to add it to your site. == Frequently Asked Questions == = Can I run whole-page variations with the Simple Content Experiments plugin? = This version of the plugin only supports in-page variations. There are other plugins that offer the whole page option. = Do all of the variations get loaded into the user's browser? = Yes. (Sort of) Each variation is wrapped in a `