New!
Discover the latest tools in the Analytics
Suite, thanks to our new online help.
Contents: Hide
This document outlines the different tagging methods which can be used on Facebook with the AT Internet tag. In this document we will deal with how the following different items can be tagged:
<a href="http://www.site.com" id="link1" onclick="xt_med('C', 'level2_number','click_name','N');">
link</a>
Facebook provides its users with different optional features known as "Applications", which are more often than not represented by "boxes" which appear whenever a profile page is displayed. Facebook is open to third-party applications, irrespective of whether the application is destined for use on the web or for local use. Different types of application exist, for example online games.
Facebook applications are more often than not interactive programmes which enable users to add features to their Facebook account It is quite easy to create a Facebook application. Several different tutorials on this subject exist and can be accessed through the following address:
https://developers.facebook.com/docs/beta/opengraph/tutorial/
As mentioned above several different types of application exist. These different applications require different tagging methods, including:
The “Like” button, available on your site, will allow Internet users to “share” content from your site with their friends on Facebook. Whenever a user clicks on your site’s like button, a new post will appear on their friend’s RSS feed, with a link to your site.
There are two different methods which can be used to add a “Like” button to your site. You can use an iframe whose code is generated directly from the Facebook website, or you can use Facebook XFBML extensions for HTML pages. The tagging method described below only concerns the XFBML version.
First of all you need to create a Facebook application so that a unique ID can be generated:
Once the ID has been retrieved, you then need to add the “Facebook” namespace to your HTML document:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
The snippet of Facebook code below then needs to be added before the end of the “BODY” tag.
<div id="fb-root"></div>
<script type="text/javascript">
<!--
window.fbAsyncInit = function() {
FB.init({appId: 'YOUR_FACEBOOK_APP_ID', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
// Do something, e.g. track the click on the "Like" button here
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
//-->
</script>
You need to follow these 3 steps:
You can now add the “Like button” code to your Web page. Here is an example of the code:
<fb:like href="http://www.atinternet.com" layout="standard|button_count" show-faces="true|false" width="450" action="like|recommend" colorscheme="light|dark" font="arial|lucida grande|segoe ui|tahoma|trebuchet ms|verdana"></fb:like>
You need to choose from the different options which are offered for the following attributes: layout, show-faces, action, colour scheme and font.
Below is an example of an HTML page containing both the "Like" button and the AT Internet content tag:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" xmlns:fb="http://www.facebook.com/2008/fbml">
<head id="Head">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Your page title goes here</title>
</head>
<body>
<fb:like href="http://www.site.com" layout="standard|button_count" show-faces="true|false" width="450" action="like|recommend" colorscheme="light|dark" font="arial|lucida grande|segoe ui|tahoma|trebuchet ms|verdana"></fb:like>
<script type="text/javascript">
<!--
xtnv = document; //parent.document or top.document or document
xtsd = "http://logxxx";
xtsite = "xxxxx";
xtn2 = "1"; // level 2 site
xtpage = "Page_Name";
xtdi = "1"; //implication degree
//-->
</script>
<script type="text/javascript" language="javascript" src="xtcore.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
<!--
window.fbAsyncInit = function() {
FB.init({appId: 'YOUR_FACEBOOK_APP_ID', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
// Do something, e.g. track the click on the "Like" button here
xt_med('C','0',href,'S');
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/fr_FR/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
//-->
</script>
</body>
</html>
www.atinternet.com/support
© AT Internet - 2016 - All rights reserved