Archive for How To

Data Privacy – Transparency to the rescue

Data Privacy Cartoon

Three days after the European Union Data Protection Day (“Full speed ahead towards reliable and modern EU data protection laws”) and the Internet Association Data Privacy Day it is time to look at data privacy in 2013. Since big data is the new oil/gold/sliced bread, it seems smart to store it in a safe or a bread box or wherever you keep your oil.

Connie Thompson of KomoNews argues that online shops and internet business are the out of control wild west of data collection. Gold diggers moving westwards to mine your data and enjoy the benefits of their new riches. And pushing the final frontier to new limits, the cowboys and girls on the fastest horses, the Google gang. Right? Wrong.

While we usually hear how governments try to protect citizens’ data from companies, Google in a coalition with other giants has turned the game upside down by lobbying for an update to a 1986 privacy protection law supported by the United States Electronic Communications Privacy Act enabling the US government to dig into your digital data from Google, Microsoft, Yahoo, Twitter and lots more. eBay CEO John Donahoe sees a further problem of government intrusion:

“There’s going to be a trigger point,” noting the need for “a national dialogue about what is acceptable or not. It’s going to be necessary for us to have some national dialogue on privacy, so we don’t have a clash point and they over regulate and slow down innovation,” he said. eBay is not in the big data business, “but I think there are huge opportunities to use data, to customise the experience, to personalise the experience, and if you choose to share with others, it can make the experience even better.”

As with most problems in society, the first step towards a solution to this problem is transparency. It builds trust and increases cooperation. If, between three very different parties – government, businesses, citizens/users – everybody put their cards on the table, an agreement can lead to a better outcome for everybody.

If companies are honest with their data privacy policy and let the user know what their data is used for, the user – if there is value to be gained – will opt in to enjoy a personalized experience. Trust-building transparency is part of a complete product that builds user loyalty.

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.

F-Commerce: Immediate return vs. big data gains

Facebook Logo

Today Elizabeth Tan on e27 raised the question if Facebook and e-commerce ever can go together as the social commerce that has been buzzing about since Facebook’s first jump on the topic in the last years. The latest roll out of Facebook Gifts has inspired over 100 merchants including Starbucks, Hulu and Pandora to sign up for the service. But big brands, already successful with their own E-Commerce Shops such as JC Penny, Gamestop and GAP, have opened and closed their F-Commerce Shops in 2011 and 2012 and have raised doubts that shop fronts on the social network can be profitable. The return on investment has been less than expected according to managers of the named companies and the revenue increase did not meet expectations either.

The question in these cases is if those who left prematurely have used Facebook’s possibilities to the fullest. As Tan mentions, “user shopping behaviours […] also creates very valuable and expensive data”. The idea is not to open up a F-Commerce shop front and then just wait until users get the hang of it and start buying, user data collected on the Facebook page can become increasingly valuable customer intelligence if correctly analysed and applied. Facebook Connect on a traditional E-Commerce shop can fuse the personalized experience of F-Commerce and E-Commerce and deliver valuable customer data that can be used to personalize and optimize the shop fronts to increase revenue and thereby return on investment. Companies dropping out of this field can miss out on big data that can enhance their whole online concept. The tools and possibilities already exist.

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

 

 

 

Switch to our mobile site