Recent Changes - Search:

Welcome to the Intranet
Calendar

Sharing

Prayer Groups
Core Values
Frequently Asked Questions
Minutes
Forms
Procedures
Links
Human Resources

Marketing

Public Relations and Social Media

Web

Product Development

Secular Product
IT

Finance and Purchasing

Customer Fulfillment

Facilities

Employee Pages


PmWiki

pmwiki.org

edit SideBar

How To Create A Google Analytics Split Test

There is a new file at /assets/snippets/split_test.php that must be updated for every new split test. Once the Google Experiment is created, make note of the experiment ID (like 159661-5, found in the third line of the JavaScript code). Open the split_test.php file, and create a name of the experiment in the $exp_map array and assign it the value of the experiment ID (you can copy one that is already in there). If you need any special handling (like adding a CSS file or setting cookies), handle that in the switch ($split_test) section. Once you’re done with those things, save and upload the file.

To have differing content (HTML or JavaScript), create new chunks in Modx using the same name you used in the snippet. For example, I created the split test “homepage_path” in the snippet, so I create a chunk named “homepage_path_0” where 0 denotes which test it is (like t=0, t=1, t=2, t=3). Make sure the name and the test number (0, 1) match what is in the snippet. Put all content in the chunk for this variation, and continue to create chunks while increasing the last number by 1 each time.

Now that the snippet has been modified and the chunks were created, go to the resource where you want to run the test. Add the snippet call like [[!split_test? tname=`homepage_path`]] to the area where you want the content to change.

Save all changes in Modx and turn on the split test.

Edit - History - Print - Recent Changes - Search
Page last modified on August 14, 2014, at 12:00 PM