From 99a8e1338953cef39b46d9ac1b47a519e02a3097 Mon Sep 17 00:00:00 2001 From: Lucas Swartsenburg Date: Thu, 31 Mar 2016 17:25:52 -0700 Subject: [PATCH] Implemented tracking functionality --- README.txt | 5 ++++- edit.php | 12 ++++++++++-- optimizely.php | 12 +++++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index d287e1b..9bb4406 100644 --- a/README.txt +++ b/README.txt @@ -3,7 +3,7 @@ Contributors: arthuracs, jonslaught, bradtaylorsf Tags: optimizely, ab testing, split testing, website optimization Requires at least: 3.0 Tested up to: 4.4 -Stable tag: 3.7.5 +Stable tag: 3.7.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -30,6 +30,9 @@ You're ready to start using Optimizely! 1. Create multiple headlines for each post 2. View your results and launch winners directly from the dashboard += 3.7.6 = +* NEW Register integration users with Optimizely + = 3.7.5 = * FIXED bug on edit post page that displayed unwanted tooltip * UPDATED default conditional activation code to exclude users coming from other sites diff --git a/edit.php b/edit.php index 3b147af..c9a20ce 100644 --- a/edit.php +++ b/edit.php @@ -67,6 +67,14 @@ function optimizely_title_variations_render( $post ) { ); echo '

'; } + + function get_tracking_function(){ + $tracking = "\n"; + return $tracking; + }; ?> @@ -77,8 +85,8 @@ function optimizely_title_variations_render( $post ) { - - + + ID) == 'publish'): ?>
diff --git a/optimizely.php b/optimizely.php index c15b42f..e6e079e 100644 --- a/optimizely.php +++ b/optimizely.php @@ -1,14 +1,14 @@ Optimizely is a dramatically easier way for you to improve your website through A/B testing. Create an experiment in minutes with our easy-to-use visual interface with absolutely no coding or engineering required. Convert your website visitors into customers and earn more revenue today! To get started: 1) Click the "Activate" link to the left of this description, 2) Sign up for an Optimizely account, and 3) Create an API Token here: API Tokens, and enter your API token in the Configuration Tab of the Plugin, then select a project to start testing! Author: Optimizely Inc. -Version: 3.7.5 +Version: 3.7.6 Author URI: http://www.optimizely.com/ License: GPL2 */ @@ -98,7 +98,13 @@ function optimizely_add_script() { * @return string */ function optimizely_generate_script( $project_id ) { - return ''; + + $script = ""; + $tracking = "\n"; + return $tracking.$result; } /**