1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[i109 Tutorial] Google Analytics for FBML

Discussion in 'FaceBook' started by imperial109, Mar 3, 2010.

  1. imperial109

    imperial109 Regular Member

    Jan 19, 2009
    Likes Received:
    Google Analytics is a powerful tracking tool that can give you
    detailed reports about your traffic. It's a great tool to have
    and it's free from the Google website. You will be able to see
    how many people saw your page; how long people stayed
    on your page; what region they are from; and many more.

    What you really need to know about the coding is that
    <fb:google-analytics uacct="UA-1234567-89" />
    is your basic
    tracker. As you may have guessed, uacct is your Analytics
    account ID. This is required and you cannot do anything
    useful without it. However, there are plenty of optional
    attributes that can be used for advanced tracking.

    Due to their numbers, I'll just give a basic rundown of each

    A boolean, or true/false, function that either keeps the info
    flag on or off, with 1 being on, and 0 being off. The default
    setting for this is set to on.

    This is a string that specifies the domain for the cookie that
    each visitor is given. The default is equal to auto, which is
    apps.facebook.com. There are two more options that allow
    you to not have the domain set, or to specify a name. For no
    domain, set it to none, and for your domain, just type in your
    desired domain, such as http://something.com.

    If you do not want your unique domain hash to be on for
    cookies, then set it to off. Otherwise, there is no need to
    include it, since the default is set to on.

    Whenever a user is not active on your page, then you can
    make the session to timeout after a specified number of
    seconds. By default, the session ends after 1800 seconds.

    If the _utm.gif file is located somewhere other than /_utm.gif,
    then you need to set this value. Otherwise, just leave it out.

    This is the transaction field separator, such as the pipe
    character |. There are no limitations on this attribute, so all
    other separators will also work.

    When you want to turn off Flash version detection, then set
    this equal to 0, otherwise set it to 1, or just leave it out

    This simple boolean function just detects the title. It is set
    automatically to do so, but if you want it off, then set it to 0.

    Unlike the other attributes, this one is off by default. It states
    whether the linker function can be used, or not. Set it to 1, if
    you want it on.

    If you want to have the anchors in a campaign to be
    enabled, then set this one to 1. And as always, 0 is to
    disable it.

    It is a good idea to leave this on the default setting. If you
    need to include the exact path for cookie tracking, then you
    are allowed to set it. The default is the forward slash /.

    This setting is used to track a sample of visitors. It is counted
    as a percent, so your options are to set it equal to any
    number between 1 and 100. This is a percentage, but do not
    include the symbol %. By default, all of your visitors are

    The campaign's tracking module can be turned on or off. Set
    it to 0 if you want it off, otherwise, just leave it out. Set it to 1
    if you really want it there, but it makes no difference as to
    what it will do.

    The timeout for the campaign tracking can be set in
    seconds. By default, it is set to 15768000, which is also the
    equivalent of six months.

    When you have more than one website, you may have split
    up your campaign. Set this equal to the name of your
    campaign. Otherwise, exclude it.

    This specifies your campaign type. Your options are cpc,
    cpm, link, email, and organic. If you want to track all of them,
    then leave it at utm_medium.

    A string attribute that represents your campaign's source can
    be set. If you leave it out, it will automatically be set to

    This is also a string that represents your campaign's
    keyword(s). The default is utm_term.

    Another string which is similar to ucsr and uctr, is the
    campaign's content.

    Your campaign's unique ID can also be included, but it is not
    necessary. This is an integer, so remember that it has to be
    a number.

    Set this string if you want to override the current campaign.
    Otherwise, leave it out, or at utm_nooverride.
    If you do not like facebook's coding for this tool, and if you
    know JavaScript, you can include the FBJS(Facebook
    JavaScript) code.
    <script src="https://ssl.google-analytics.com/urchin.js"
    <script type="text/javascript">
    _uacct = "UA-9999999-99";
    The Analytics function, urchinTracker, is enabled by setting it
    to the outgoing website.
    <a href="http://something.com"
    " />