Fb:google-analytics

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Inserts appropriate Google Analytics code into a canvas page.

Attributes

RequiredNameTypeDescription
required uacct string Your Urchin/Google Analytics account ID.
optional page string The argument given to the urchinTracker() function, either a page or a virtual page.
ufsc bool Sets client info flag, where 1=on and 0=off. This is a UTM user setting. (Default value is 1.)
udn string Sets the domain name for cookies. Specify auto, none or domain. This is a UTM user setting. (Default value is auto.)
uhash string Specify whether the unique domain hash for cookies is on or off. This is a UTM user setting. (Default value is on.)
utimeout int Sets the inactive session timeout in seconds. This is a UTM user setting. (Default value is 1800.)
ugifpath string Set the Web path to the __utm.gif file. This is a UTM user setting. (Default value is /__utm.gif.)
utsp string The transaction field separator. This is a UTM user setting. (Default value is | (a pipe character).)
uflash bool Sets the Flash version detection option, where 1=on and 0=off. This is a UTM user setting. (Default value is 1.)
utitle bool Sets the document title detection option, where 1=on and 0=off. This is a UTM user setting. (Default value is 1.)
ulink bool Enables linker functionality, where 1=on and 0=off. This is a UTM user setting. (Default value is 0.)
uanchor bool Indicates whether the use of anchors for campaigns is enabled, where 1=enabled and 0=disabled. This is a UTM user setting. (Default value is 0.)
utcp string Specifies the cookie path for tracking. This is a UTM user setting. (Default value is /.)
usample int Represents the sampling percentage of visitors to track, which is a whole number from 1 to 100. This is a UTM user setting. (Default value is 100.)
uctm bool Sets the campaign tracking module state, where 1=on and 0=off. This is a UTM campaign tracking setting. (Default value is 1.)
ucto int Sets the timeout in seconds. This is a UTM campaign tracking setting. (Default value is 15768000, or 6 months.)
uccn string The name of the campaign. This is a UTM campaign tracking setting. (Default value is utm_campaign.)
ucmd string Represents the campaign medium. Specify cpc, cpm, link, email or organic. This is a UTM campaign tracking setting. (Default value is utm_medium.)
ucsr string Represents the campaign source. This is a UTM campaign tracking setting. (Default value is utm_source.)
uctr string The campaign term or keyword. This is a UTM campaign tracking setting. (Default value is utm_term.)
ucct string Represents the campaign content. This is a UTM campaign tracking setting. (Default value is utm_content.)
ucid int Represents the campaign ID number. This is a UTM campaign tracking setting. (Default value is utm_id.)
ucno string Indicates whether or not to override the campaign. This is a UTM campaign tracking setting. (Default value is utm_nooverride.)

Examples

Inserting:

<fb:google-analytics uacct="UA-9999999-99" />


Yields:

<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-9999999-99"; urchinTracker(); </script>

Notes

  • This tag can only be used on canvas pages.
  • The urchinTracker function provided by Google Analytics can be accessed in FBJS through Facebook.urchinTracker. To enable, include something similar to the following:
<a href="http://www.example.com" onclick="Facebook.urchinTracker('/outgoing/example.com')">
  • You must include the <fb:google-analytics> tag on your page if you're going to call Facebook.urchinTracker in FBJS

See Also

reference