Archive for Products

A/B-Test and multivariate testing – are you brave enough?

AB-Test

The quote “If design isn’t profitable, then it’s art” by Fisker Automotive CEO Henrik Fiskar has made the travel from car design to homepage design. A bold statement made by a man who designed beautiful pieces of profitable art such as the Aston Martin V8 Vantage and oversaw James Bond’s DB9-launch, it sounds fairly reasonable for landing page and e-commerce shop owners who are not used to answer to art critics anyway.

But with a designer and a marketing executive with an eclectic taste in their ears, how brave are e-commerce shop owners really to listen to their audience and abandon their shop and landing page designs after an A/B test or even after multivariate testing?

The bravest and boldest statement recently came from a marketing exec for a real big landing page in the lead generation business, preparing himself mentally for a redesign after multivariate testing: “If that is what it takes to increase the conversion rate, paint it all green. The whole page. Maybe show our logo somewhere, that would be nice.”

If your e-commerce shop and your landing pages are high quality pieces of art, congratulations, show your designs and have the audience applaude – and then abandon the page. Going for conversions though requires a lot of testing and following the results that give you the best conversion rates, even though you might not understand your users taste.

Social Analytics+ meets Google Chrome

Screenshot from Chrome Web Store

 

We decided to share our latest development with the world in the form of a Browser Extension. So if you are using Google Chrome you simply need to “add this extension” and with a simple update of the options you’ll be able to access your instance of Social Analytics+ (this requires a Social Analytics+ account and implementation) and begin to discover the shared interests of your actual audience!

Part 3 – Rewind to Facebook Connect

In the first blog I showed you how to add the ADTELLIGENCE “tracking pixel” from our Social Analytics+ tool, in the second blog I showed you how I added a WordPress Plugin to access Facebook through the blog. Now in the third I’m going to explain why the second blog post was wrong and what I  did to get a true “Facebook Connect” into the blog and then how I modified the “tracking pixel” to work with the Facebook data.

I’ve been writing these blogs from the perspective of someone who has no idea about our tool as I wanted to show how easy it was to add but also try to catch and address some of the basic questions that might arise. I hit the first of those questions yesterday when I realized that my efforts in the second blog were 1) a learning experience but 2) in vain.

Facebook has made life easy for developers who want to incorporate Facebook and various websites and in the last blog what I settled on was actually a “Social Plugin” and not the Facebook Connect that I really needed. Now it should be said that with Facebook Connect you are in this case actually adding a Facebook User to your WordPress blog. So ensure that “anyone can register” and that a registered user gets the role of “subscriber” initially.

Next you’ll want to deactivate the plugin (if it’s the same one I added) since the new one I found and have tried now seems to work. If not it will kill your WordPress install since they will conflict with each other.

Remember the whole point here is to get more than just the basic data, it’s to get the social data.

Stats after 2 days

Heatmap after 2 days

So here we go off and running, I once again began searching for a proper plugin. Yes at this stage I did considering building the whole FB Connect integration myself but hey there are plugins so why not…

What I finally decided on was the following “Facebook AWD All in One“, it seems to work and I was able to get the Facebook user so I knew Facebook Connect was working.

Configuration was a bit of fun though as there are several other items one has to consider when doing this.

First you needed to do the Facebook APP ID and Secret like before, and the various other preferences by choice. The one new aspect though was the API permissions. Now these are very important. You need to alert your users as to what information from Facebook you are asking them to share with you. Regardless of what you ask though it’s still only based on what they share with everyone, privacy is important after all.

To find out the choices of permissions you can visit the Developer section on API Permissions. For Our “Social Analytics+” tool there are a few things you need to ask for in order to send the data to our tool. We will update you as there are changes in the works for additional data as well.

  • user_about_me – gender, bio, name, the basics
  • user_likes – what they like
  • user_birthday – their age
  • email -Our tool does not but WordPress does need the ability to email users with comment notifications and such.

Settings

Now it’s time to get back to the code, if you remember from the first and second blog we had modified the “header.php” of the WordPress install to get the “tracking pixel” in place. Well to make life a bit easier we are going to move it from the “header.php” and place it in the “footer.php” instead.

So head over to “Appearance” from the admin login on your blog and choose the “editor” option. Find the “body” tag in “header.php” and remove the code we added. Now update that file and choose the “footer.php“.

For me I decided to add the code right after the “DIV” tag for the foot, basically the end of the file.

The basic’s are the following:

<?php
 $companyid = '#######';
 //get the facebook AWD object
 global $AWD_facebook;
 //get the facebook icon if exist and if activated and if there is a facebook account
 if($AWD_facebook->plugin_option['connect_enable'] == 1){
   $fbuid = get_user_meta($user_ID,'fb_uid', true);
   if($fbuid != ''){
    echo '<img src="http://socialanalytic-1085123149.eu-west-1.elb.amazonaws.com/socialanalytic-web-rest/rest/action/'.$companyid.'/'.$fbuid.'/p1/s1" border="0" height="1" width="1">';
   }else{
     echo '<img src="http://socialanalytic-1085123149.eu-west-1.elb.amazonaws.com/socialanalytic-web-rest/rest/action/'.$companyid.'/'.time().'/p1/s1" border="0" height="1" width="1">';
   }
 }
?>

 

However all this does is change the unique User ID, to capture the “social” data we now have to hack a little more into the plugin to get the “access token” to then be able to access more of the user’s social data.

<?php
/*
*  ADTELLIGENCE GmbH Social Analytics+
* (C) 2011 ADTELLIGENCE GmbH
* info@adtelligence.de

<ns0:UserAddRequest xmlns:ns0="http://www.adtelligence.de/socialanalytic/webservice/">
	<id>500064793</id>
	<birthday>1976-02-16</birthday>
	<gender>male</gender>
	<Interests>
		<interest id="20950498489">
			<name>Girl With The Dragon Tattoo</name>
			<category>Book</category>
		</interest>
	</Interests>
</ns0:UserAddRequest>

*/
$adt_user = 'xxxxxxxxxx';
$adt_pwd = 'xxxxxxxxxx';
$companyid = 'xxxxxxxxx';
$url = 'http://socialanalytic-1085123149.eu-west-1.elb.amazonaws.com/socialanalytic-web-rest/rest/user/'.$companyid;
//get the facebook AWD object
global $AWD_facebook;
//get the facebook user ID and user info
if($AWD_facebook->plugin_option['connect_enable'] == 1){
	$fbuid = get_user_meta($user_ID,'fb_uid', true);
	if($fbuid != ""){
		$user = json_decode(file_get_contents('https://graph.facebook.com/'.$fbuid.'?access_token='.$AWD_facebook->fcbk->getAccessToken()),true);
		$xml_data = '<ns0:UserAddRequest xmlns:ns0="http://www.adtelligence.de/socialanalytic/webservice/">'.
						'  <id>'.$fbuid.'</id>'.
						'  <birthday>'.substr($user['birthday'],7,4)."-".substr($user['birthday'],0,2)."-".substr($user['birthday'],4,2).'</birthday>'.
						'  <gender>'.$user['gender'].'</gender>'.
						'  <Interests>';

		$likes = json_decode(file_get_contents('https://graph.facebook.com/'.$fbuid.'/likes?access_token='.$AWD_facebook->fcbk->getAccessToken()),true);

		for ($x = 0; $x < count($likes['data']); $x++) {
			$xml_data .= '   <interest id="'.$likes['data'][$x]['id'].'">'.
							'      <name><![CDATA['.$likes['data'][$x]['name'].']]></name>'.
							'      <category>'.$likes['data'][$x]['category'].'</category>'.
							'    </interest>';
		}
		$xml_data .= '  </Interests>'.
						'</ns0:UserAddRequest>';

		/** use a max of 256KB of RAM before going to disk */
		$fb = fopen('php://temp/maxmemory:256000', 'w');
		if (!$fb) {
		    echo 'could not open temp memory data';
		    exit();
		}
		fwrite($fb, $xml_data);
		fseek($fb, 0);

		$adt_ch  = curl_init($url);
		curl_setopt($adt_ch , CURLOPT_VERBOSE, 1);
		curl_setopt($adt_ch , CURLOPT_HEADER, 0);
		curl_setopt($adt_ch , CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($adt_ch , CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
		curl_setopt($adt_ch , CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
		curl_setopt($adt_ch , CURLOPT_USERPWD, "$adt_user:$adt_pwd");
		curl_setopt($adt_ch , CURLOPT_PUT, 1);
		curl_setopt($adt_ch , CURLOPT_BINARYTRANSFER, 1);
		curl_setopt($adt_ch , CURLOPT_INFILE, $fb);
		curl_setopt($adt_ch , CURLOPT_INFILESIZE, strlen($xml_data));

		if (($result = curl_exec($adt_ch )) === FALSE) {
			echo 'cURL error: '.curl_error($adt_ch )."<br />\n";
		}
		$resultArray = curl_getinfo($adt_ch);

		echo "HTTP_CODE:".$resultArray['http_code'];

		fclose($fb);
		curl_close($adt_ch );
		echo '<img src="http://socialanalytic-1085123149.eu-west-1.elb.amazonaws.com/socialanalytic-web-rest/rest/action/'.$companyid.'/'.$fbuid.'/p1/s1" border="0" height="1" width="1">';
	}else{
		echo '<img src="http://socialanalytic-1085123149.eu-west-1.elb.amazonaws.com/socialanalytic-web-rest/rest/action/'.$companyid.'/'.time().'/p1/s1" border="0" height="1" width="1">';
	}
}
?>

 

You’ll need to of course update/edit the lines (20-22) for “User”, “Pwd” and “CompanyID” these were sent to you via the initial registration email. The “CompanyID” can actually be found in the url after the “/action/” right before we added the timestamp or FB user ID.

Update the file and you should be off and running…

Social Data

 

 

 

Part 2 – Facebook Connect and Social Analytics+

In the last blog post, I showed how easy it was to get started using our free version of Social Analytics+ – however the statistics that it tracked was very limited at that point.

Stats to Date

Heatmap

So now it’s time to “turn on” the social though, this means something as simple as adding Facebook Connect to my blog in order to let readers interact via their Facebook account with what I have written on my blog post. To do this I started searching for an existing “Facebook Connect” plugin, of which there are many so take a look around and read them to find one that suits you and what you want to do best. For me this was the “comment” area of my blog.

I decided on the plugin, “Facebook Comments for WordPress

Plugin

Plugin Description

 

Install and Activate

So far so good and pretty easy. Next to so what to do after it’s been activated.

Settings

Settings and Configuration

From here I need to connect to Facebook and create an app, this will give me the ID and Secret I need for the plugin to function properly.

 

Facebook Apps

I won’t go into all the details of creating the Facebook app as they are pretty straightforward.

The rest of the settings are your own preferences, don’t forget to add the “JavaScript” options at the bottom then “update”.

To see it in action just head over to a post on your page and check the comment section.

Not logged in

I opted to show both the Facebook comments as well as the WordPress Comments since my blog has been up for awhile.

Logged In

Now of course I head to my “fanpage” inside of Facebook and there I can let everyone know they can now post with Facebook to the comments of entries.

Fanpage

Of course this is not all we have to do, now we need to modify the changes we made in the first blog to understand that we have a Facebook user ID involved for the “tracking pixel” and thus give us more accurate data and of course the “social” data involved as well. That is for the next blog though.

 

 

Switch to our mobile site