How To Install Optimizely on WordPress

If you’ve spent any time working in digital marketing or analytics, you’re already familiar with the power of A/B testing.  A/B testing (and it’s more complicated brother multivariate testing) allows site owners to find out optimal combinations of site design and content for their visitors without having to directly ask/inconvenience the user.  All it takes to improve a website is forming a hypothesis of something that could work better, creating multiple versions of a page (or other content), setting up the experiment…and the money flows in faster than you can count it.  At least, that’s the hope!

At the enterprise level, there are plenty of testing tools such as Omniture Test & Target, SiteSpect, WebTrends Optimize, and Monetate, but these tools are cost-prohibitive to all but the largest websites.  Google provides Google Website Optimizer (for free!), but that has often been viewed as difficult to manage, especially for dynamically created websites.  That’s where Optimizely comes in.

Optimizely’s tagline is “A/B testing software you’ll actually use”, a reference to complication (and I think indirectly, the expense) of other testing tools in the marketplace.  Optimizely claims is that you can start testing after adding a single line of JavaScript code…and here’s how you do it.

Getting Started - Sign up

The first step to installing Optimizely is to sign up. A 30-day trial is provided, but you do need to put in a credit card to activate the free trial.

After doing so, when you click on the “Implementation” button, a pop-up shows you your customized “single line of code” to implement.


Clicking on the "Implementation" link gives you your JavaScript code

Installing Optimizely code snippet in WordPress Header

When you click on the ‘Implementation’ link, you’ll get code that looks like the following:

<script src="//"></script>

What we want to do is install this code in our WordPress header, pretty much after the first <head> tag.  By placing the code as high as possible in the WordPress header, this gives Optimizely the ability to affect your website as soon as the page starts loading, and assures that your site visitors don’t notice anything happening before their eyes!


The only consideration you need to make when installing the code snippet is whether your site is already running jQuery or not.  You can determine this by looking in the header of your WordPress site to see if there are any scripts that say something like jquery-xxxx.js.  If you don’t see any jQuery references in the header, you don’t need to do anything: Optimizely already includes jQuery!  If you already have jQuery installed, be sure to place the Optimizely code snippet after the WordPress jQuery reference.  Then, go to the Optimizely website, click on the  My Experiments" -> "View All Experiments" - > "Project Code" menu to change the jQuery settings to “Do not include”.

After you place the code snippet line in the header and hit save, that’s it!  You’ll be able to start using Optimizely to create experiments.

Integrating Optimizely with Google Analytics

In order to track your Optimizely experiments within Google Analytics, no code changes need to be made.  The only thing you need to do is make sure you have the asynchronous version of the Google Analytics code installed and a free custom variable slot.  Then, within the Optimizely interface, you can choose which custom variable to write your data to and you’re done.

Using Omniture SiteCatalyst Target Report To Calculate YOY growth

Of the hundreds of stock reports and capabilities present within Adobe (Omniture) SiteCatalyst, calculating year-over-year growth isn’t the easiest thing to do.  And while conversion reports (eVars) have the “Compare Dates” functionality within the calendar menu, we can’t quickly plot the difference between two time periods within a dashboard.  This is where the Omniture SiteCatalyst Target report comes in handy.

Setting up your “Goal”

Within the Omniture Knowledge Base KB2153, I think Omniture does a disservice by stating:

Targets are quantifiable goals that you can place within the SiteCatalyst interface and compare against reports.

While this is a true statement, I think one of the reasons that the Omniture SiteCatalyst Target report isn’t more widely used is that it doesn’t have to be a future “goal” per se, any set numbers can be used.  When last year’s numbers are used, the report becomes a year-over-year comparison!

For this example, I’m going to be comparing page views year-over-year.  Here’s what the page views summary by month looks like for 2011:


Omniture Page Views Report - 2011

Using this report to set a year-over-year target, we can see the early months are in the few thousands of page views, increasing to 12,000 -14,000 later in the year.

Omniture SiteCatalyst Target interface - Inputting our numbers

Screen Shot 2012-02-22 at 7.49.46 AM

Monthly Target Setup within Omniture Interface

Assuming you are using Omniture SiteCatalyst v15, you set up a Target report under Favorites -> Targets -> Manage Targets, then choose Add New once you’re in the Targets menu.  I’ll be setting up a monthly target for Page Views, so I’ll just type it in instead of using the file upload capability.  For this example, we want to apply this target to “Entire Site” for the “Page Views” Metric.  The date range will be all of 2012, with “Monthly” granularity.  This will give you 12 boxes to type in the 2011 Page View results, and once we hit “Ok” to save, we’ll have our year-over-year report set up.

Getting the Year-over-Year graph within Omniture

Showing the results of our newly created Target report is as easy as going to Favorites -> Targets, then choosing the appropriate Target.  By default, the report will show like a normal metric report, with a green overlay for your targets:


Default view of Omniture SiteCatalyst Target report

The above report shows that Page Views for January 2012 are well above our January 2011 “Target” and that February has already exceeded the goal as well…which is great since we’ve got 7 more days left in the month!

If we want to show the year-over-year delta, however, we can choose the “Variance” report option at the top of the graph.  Doing so will show the following report:


Omniture SiteCatalyst Target Report - "Variance" option

By placing this report in a dashboard, we can quickly evaluate whether Page Views have grown by month year-over-year.  It’s disappointing that the only graph option Adobe provides is the raw metric higher/lower than the target instead of a percentage difference view, but the percentage difference is calculated as part of the data table view that goes along with this report.


When talking about “growth” many businesses aren’t content with just year-over-year growth, usually aiming for 10%, 20%…10,000% growth.  These are goals that work well to track within the Omniture SiteCatalyst Target report.  But year-over-year growth can be worth monitoring too, and the Omniture SiteCatalyst Target report is a great way to do so.

Claim Your Newest Klout Perk: An SEC Investigation!


"Ownership in startup companies for nothing...sign up today!"

I’m not sure what it is about Klout that keeps me coming back.  I tell myself that as a digital marketer/analyst that I need to monitor the newest trends in the market, blah blah blah.  But every time I interact with Klout, they find a new way to abuse me, leaving me feeling dirty for having looked to see what value they assign to me based on the data that I willingly provide.

Klout Perks - Send a lot of Tweets, get free sh-!

In a previous post on Klout, I wrote that “Klout Perks” don’t seem like the most effective way for a business to market.  Especially given that fact that these advertisement ‘perks’ are often locked when a user clicks on them (and in some cases, weren’t ever available…).  Showing a customer an offer then saying “just kidding” is nothing more than a low stakes bait-and-switch, and a way to sully brand reputation.

That said, trying to get “influential” people using your goods is a tried-and-true advertising technique, and one that companies pay handsomely for.  You see it in car commercials, luxury goods like watches and clothing, and even home goods retail. So again, I can’t fault large companies that are testing into new markets, as top-line growth can often be hard to find (and expensive!)

But once you start moving into investment offers, venture capital, and startups, now you’re moving into a whole other world of due diligence…

I qualify for “Wahooly”…what’s that?

After signing into Klout this most recent time, I see that I now qualify for a perk from Wahooly, which from the banner ad seems to be some sort of influence-peddling for equity shares in startups.  WTF?  Equity to people who’ve never met the founders, just that their Klout score is above 35!

Rather than flex my MBA muscles on the value of equity in unknown companies, I decided to just Google ‘Wahooly’ and see what comes up.  One of the results that popped up was from Ad Age, an industry publication I generally trust.  Imagine my surprise when I see the lede:

Set to Launch in January, Wahooly Walks a Grey Area In Securities Law

Hmmm, nice partnership you’ve got going here Klout…interesting that you think I might be interested, or at the very least be able to help.

Wanting to know more, I dug farther into the article to find these two gems:

…But according to Linda Goldstein, chair of the advertising, marketing and media division at the law firm Manatt, Phelps & Phillips, the fact that the [equity] stakes have a potential future value constitutes a material connection that would make them subject to the regulations.

“If you’re an equity stakeholder in a company, I can guarantee that the FTC is going to think that’s a relationship that needs to be disclosed,” she said…

…Wahooly is looking to structure itself like a venture capital fund, in which it would be the sole shareholder and represent the interests of its users, and thereby avoid registering itself and the startups it represents with the Securities and Exchange Commission as public companies…

However, the SEC has a history of cracking down on so-called “free stock” offerings that seek to be exempted from registration on that basis.

After reading the Ad Age article, I looked to see what disclosures were presented on the Klout website, similar to something like this:

“Your newest Klout perk may require your pursuit of legal representation.  Please consult a financial adviser, lawyer, and anyone else that may be relevant before accepting this offer”

Why am I not surprised there aren’t any?

Key to investing success:  Stick with what you know

I’m sure that it goes without saying that I’ll be passing on this newest “Perk”.  As much as I like money and enjoy arguing the merits of different legal interpretations, I need to talk with the Federal Trade Commission and the Securities and Exchange Commission like I need a kick in the groin.

And yet after all this abuse, I don’t delete my Klout account.  Maybe I DO need a kick in the groin…

  • RSiteCatalyst Version 1.4.13 Release Notes
  • RSiteCatalyst Version 1.4.12 (and 1.4.11) Release Notes
  • Self-Service Adobe Analytics Data Feeds!
  • RSiteCatalyst Version 1.4.10 Release Notes
  • WordPress to Jekyll: A 30x Speedup
  • Bulk Downloading Adobe Analytics Data
  • Adobe Analytics Clickstream Data Feed: Calculations and Outlier Analysis
  • Adobe: Give Credit. You DID NOT Write RSiteCatalyst.
  • RSiteCatalyst Version 1.4.8 Release Notes
  • Adobe Analytics Clickstream Data Feed: Loading To Relational Database
  • Calling RSiteCatalyst From Python
  • RSiteCatalyst Version 1.4.7 (and 1.4.6.) Release Notes
  • RSiteCatalyst Version 1.4.5 Release Notes
  • Getting Started: Adobe Analytics Clickstream Data Feed
  • RSiteCatalyst Version 1.4.4 Release Notes
  • RSiteCatalyst Version 1.4.3 Release Notes
  • RSiteCatalyst Version 1.4.2 Release Notes
  • Destroy Your Data Using Excel With This One Weird Trick!
  • RSiteCatalyst Version 1.4.1 Release Notes
  • Visualizing Website Pathing With Sankey Charts
  • Visualizing Website Structure With Network Graphs
  • RSiteCatalyst Version 1.4 Release Notes
  • Maybe I Don't Really Know R After All
  • Building JSON in R: Three Methods
  • Real-time Reporting with the Adobe Analytics API
  • RSiteCatalyst Version 1.3 Release Notes
  • Adobe Analytics Implementation Documentation in 60 Seconds
  • RSiteCatalyst Version 1.2 Release Notes
  • Clustering Search Keywords Using K-Means Clustering
  • RSiteCatalyst Version 1.1 Release Notes
  • Anomaly Detection Using The Adobe Analytics API
  • (not provided): Using R and the Google Analytics API
  • My Top 20 Least Useful Omniture Reports
  • For Maximum User Understanding, Customize the SiteCatalyst Menu
  • Effect Of Modified Bounce Rate In Google Analytics
  • Adobe Discover 3: First Impressions
  • Using Omniture SiteCatalyst Target Report To Calculate YOY growth
  • Google Analytics Individual Qualification (IQ) - Passed!
  • Google Analytics SEO reports: Not Ready For Primetime?
  • An Afternoon With Edward Tufte
  • Google Analytics Custom Variables: A Page-Level Example
  • Xchange 2011: Think Tank and Harbor Cruise
  • Google Analytics for WordPress: Two Methods
  • WordPress Stats or Google Analytics? Yes!
  • Parallelizing Distance Calculations Using A GPU With CUDAnative.jl
  • Building a Data Science Workstation (2017)
  • JuliaCon 2015: Everyday Analytics and Visualization (video)
  • Vega.jl, Rebooted
  • Sessionizing Log Data Using data.table [Follow-up #2]
  • Sessionizing Log Data Using dplyr [Follow-up]
  • Sessionizing Log Data Using SQL
  • Review: Data Science at the Command Line
  • Introducing Twitter.jl
  • Code Refactoring Using Metaprogramming
  • Evaluating BreakoutDetection
  • Creating A Stacked Bar Chart in Seaborn
  • Visualizing Analytics Languages With VennEuler.jl
  • String Interpolation for Fun and Profit
  • Using Julia As A "Glue" Language
  • Five Hard-Won Lessons Using Hive
  • Using SQL Workbench with Apache Hive
  • Getting Started With Hadoop, Final: Analysis Using Hive & Pig
  • Quickly Create Dummy Variables in a Data Frame
  • Using Amazon EC2 with IPython Notebook
  • Adding Line Numbers in IPython/Jupyter Notebooks
  • Fun With Just-In-Time Compiling: Julia, Python, R and pqR
  • Getting Started Using Hadoop, Part 4: Creating Tables With Hive
  • Tabular Data I/O in Julia
  • Hadoop Streaming with Amazon Elastic MapReduce, Python and mrjob
  • A Beginner's Look at Julia
  • Getting Started Using Hadoop, Part 3: Loading Data
  • Innovation Will Never Be At The Push Of A Button
  • Getting Started Using Hadoop, Part 2: Building a Cluster
  • Getting Started Using Hadoop, Part 1: Intro
  • Instructions for Installing & Using R on Amazon EC2
  • Video: SQL Queries in R using sqldf
  • Video: Overlay Histogram in R (Normal, Density, Another Series)
  • Video: R, RStudio, Rcmdr & rattle
  • Getting Started Using R, Part 2: Rcmdr
  • Getting Started Using R, Part 1: RStudio
  • Learning R Has Really Made Me Appreciate SAS