This document discusses exploring human identity through personalization and data mining. It covers foundations of identity like tribalism, experimental identity methods like WebFinger and BrowserID, tracking anonymous users, and social grouping. It also discusses challenges like privacy concerns and finding the right balance between insight and being creepy. The key lessons are that identity is more than just a login, to have social conscience, and to choose tools that have needed data and work for your business.
2012 ConvergeSE: Exploring Human Identity Through Personalization and Data Mining
1. Exploring Human Identity
Through Personalization and Data Mining
Jonathan LeBlanc
Developer Evangelist: X.commerce
Twitter: @jcleblanc
E-Mail: jleblanc@x.com
Github: github.com/jcleblanc
2. What We’re Going to Cover
The Foundations of Human Identity
Tribalism and Social Grouping
Experimental Identity Methods
The Big Bag of Social Identity Fail
http://www.x.com http://slideshare.net/jcleblanc
3. What We’re Going to Cover
The Foundations of Human Identity
Tribalism and Social Grouping
Experimental Identity Methods
The Big Bag of Social Identity Fail
http://www.x.com http://slideshare.net/jcleblanc
4. Human Identity: User Types
Anonymous Users Registered Users
http://www.x.com http://slideshare.net/jcleblanc
5. Human Identity: Open Identity Programming
OpenID (…and the upcoming OpenID Connect)
PayPal Access, Google, Yahoo!
OAuth (1.0a + 2.0)
PayPal Access, Facebook, Twitter
BrowserID
Mozilla
http://www.x.com http://slideshare.net/jcleblanc
7. Human Identity: Tracking Anonymous Users
There are a few common options
Tracking Cookie Local Storage
http://www.x.com http://slideshare.net/jcleblanc
8. Human Identity: Tracking Anonymous Users
Program Overview
• On each page visited, track the URL
• HTML5 Local Storage as primary storage
• Cookies as secondary storage
http://www.x.com http://slideshare.net/jcleblanc
9. Tracking Anonymous Users with Local Storage
var storeName = "visited";
if (typeof(localStorage) == 'undefined' ) {
//Local Storage Not Available
} else {
try {
var sites = localStorage.getItem(storeName);
sites = (sites === null) ? window.location : sites + window.location;
localStorage.setItem(storeName, sites + "|");
} catch (e) {
if (e == QUOTA_EXCEEDED_ERR) {
//quota exceeded
}
}
}
10. Tracking Anonymous Users with Cookies
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' '){ c = c.substring(1, c.length) };
if (c.indexOf(nameEQ) == 0){
return c.substring(nameEQ.length, c.length);
}
}
return null;
}
11. Tracking Anonymous Users with Cookies
var storeName = "visited";
if (typeof(localStorage) == "undefined" ) {
var cookieVal = readCookie(storeName);
var value = ((cookieVal === null) ? window.location : cookieVal
+ window.location);
var days = 1;
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
var expires = "; expires=" + date.toGMTString();
document.cookie = storeName + "=" + value + "|"
+ expires + "; path=/";
} else {
//Use Local Storage
}
12. Human Identity: Tracking Anonymous Users
Next Steps / Improvements
• Remove oldest results when storage fills
• Build categorization mapping prior to
storage to save space (more on this later)
http://www.x.com http://slideshare.net/jcleblanc
20. PayPal Access: Using the Access Token
//construct URI to fetch profile information for current user
$profile_url =
sprintf("%s?oauth_token=%s", PROFILE_ENDPOINT, $token-
>access_token);
//fetch profile of current user
$profile = run_curl($profile_url);
var_dump($profile);
?>
21. PayPal Access: Using the Raw Data
http://www.x.com http://slideshare.net/jcleblanc
22. PayPal Access: Using the Raw Data
http://www.x.com http://slideshare.net/jcleblanc
23. What We’re Going to Cover
The Foundations of Human Identity
Tribalism and Social Grouping
Experimental Identity Methods
The Big Bag of Social Identity Fail
http://www.x.com http://slideshare.net/jcleblanc
24. Social Grouping: It’s Not A New Thing…
http://www.x.com http://slideshare.net/jcleblanc
25. Social Grouping: Foundation in Tribalism
Tribalism started as a way to keep us safe
…it has lead to some horrible parts of history
but it is also a foundation of many of our social
relationships
http://www.x.com http://slideshare.net/jcleblanc
26. Social Grouping: The Real Life Social Graph
http://www.x.com http://slideshare.net/jcleblanc
27. Social Grouping: The Online Social Graph
http://www.x.com http://slideshare.net/jcleblanc
28. Social Grouping: Group Types
Follower Type
Connection Type
Group Type
http://www.x.com http://slideshare.net/jcleblanc
29. Social Grouping: Data Miners are Rock Stars
http://www.x.com http://slideshare.net/jcleblanc
30. Social Grouping: Group Programming Primer
Program Overview
• Use all URLs from the previous program.
• Obtain content category for page.
• Categorize user interest.
http://www.x.com http://slideshare.net/jcleblanc
31. Social Grouping: Group Programming Primer
Step 1: Obtain
Website Content
http://www.x.com http://slideshare.net/jcleblanc
32. Social Grouping: Group Programming Primer
Step 2: Perform
Keyword Density
Search
http://www.x.com http://slideshare.net/jcleblanc
33. Social Grouping: Group Programming Primer
Step 3: Weight
Keywords
http://www.x.com http://slideshare.net/jcleblanc
34. What We’re Going to Cover
The Foundations of Human Identity
Tribalism and Social Grouping
Experimental Identity Methods
The Big Bag of Social Identity Fail
http://www.x.com http://slideshare.net/jcleblanc
40. Experimental Identity: WebFinger
profileUrl name
id formatted
thumbnail url family name
urls given name
photos display name
http://www.x.com http://slideshare.net/jcleblanc
45. What We’re Going to Cover
The Foundations of Human Identity
Tribalism and Social Grouping
Experimental Identity Methods
The Big Bag of Social Identity Fail
http://www.x.com http://slideshare.net/jcleblanc
46. Social Identity Fail: Personal Safety
When Social Discovery Impacts Personal Safety
“My privacy concerns are not trite.
They are linked to my actual
physical safety”
--Harriet Jacobs (Gizmodo)
http://www.x.com http://slideshare.net/jcleblanc
47. Social Identity Fail: Privacy Concerns
When Making Things Easy Impairs Privacy
“Path Uploads Your Entire iPhone
Contact List By Default”
--Mark Hachman (PCMag)
http://www.x.com http://slideshare.net/jcleblanc
48. Social Identity Fail: The Fine Line
The Fine Line Between Insightful and Creepy
“How Target Figured Out A Teen Girl
Was Pregnant Before Her Father Did”
--Kashmir Hill (Forbes)
http://www.x.com http://slideshare.net/jcleblanc
49. Identity Programming Core Concepts
Identity is more than just a login
Have a social conscience
Find the tool that:
– Has the raw data that you need
– Works with your business
http://www.x.com http://slideshare.net/jcleblanc
50. Thanks! Any Questions?
http://slidesha.re/convergese_id
Jonathan LeBlanc
Developer Evangelist: X.commerce
Twitter: @jcleblanc
E-Mail: jleblanc@x.com
Github: github.com/jcleblanc
Notas del editor
Concepts of bound vs unbound scopes
Suck in web content via curlConvert to valid XML document (do not use as text and run Regex against it)
Search through text on the page and store words + how often they are usedStrip out common words
Use meta description and keywords to match against your keyword density searchUse Open Graph protocol tags to find more keywords and page content
http://www.forbes.com/sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregnant-before-her-father-did/The statistician is now a rock star