Engagement/Analytics/Webtrends/Tracking

From MozillaWiki
Jump to navigation Jump to search

DCS Tracking Code

There are a couple of different tagging options depending on what type of reporting you wish to do.  I will present the tags for each here:

1.  Basic 2-step Scenario Analysis reporting usually tracks the presentation of an action (a.k.a an impression) and the actualization of that action, usually a click. 

For example, a user my land on a page on the Mozilla.org site that presents them with the option to download Firefox -an impression.  The user may then decide to download Firefox by clicking on a link that downloads the application.

So step 1, impression, step 2 click on the download button.

In order to capture this behavior within Webtrends you would apply the following tags as specified below:

In the page header please apply the following META tags (it is these tags that specify the above-mentioned 'impression'):
<META name="WT.si_n" content="Download Firefox" />
<META name="WT.si_x" content="1" />

In order to capture the click event, please apply the following dcsMultiTrack call to the onClick event handler of the associated link:

    dcsMultiTrack('DCS.dcssip', 'www.mozilla.org',
    'DCS.dcsuri', '/en-US/download',
    'WT.ti', 'Link: Download Firefox',
    'WT.dl', 1,
    'WT.si_n', 'Download Firefox',
    'WT.si_x', '2')

Please note the structure of the dcsMultiTrack function call:
dcsMultiTtrack('Name1', 'Value1', 'Name2', 'Value2', ... , 'NameN', 'ValueN')                              
                             
Here is a short description of the above parameters:
DCS.dcssip - the domain of the page you wish to track
DCS.dcsuri - the uri of the page you wish to track
WT.ti - The link title
WT.dl - a parameter that specifies a given action - for dcsMultiTrack clicks we use 1
WT.si_n - the name of the associated 'scenario' you are tracking
WT.si_x = the step of the associated 'scenario' you are tracking -note for the impression this value is equal to 1 and for the click it is equal to 2


2.  Another type of reporting that requires the use of dcsMultiTrack is campaign tracking.  Campaign tracking is also usually a 2-step process.  Typically, a banner ad exists on an external site that 'lands' on Mozilla.org.  This banner ad is identified by a custom Webtrends parameter called WT.mc_id; it is included as a query parameter on the banner link.  The landing page usually presents an action like downloading Firefox.  The goal is to determine the effectiveness of a campaign by identifying how many downloads originated from users that clicked the banner ad -or in other words, how many downloads can be 'attributed' to the campaign effort.

In order to capture the download click event we apply the following dcsMultiTrack call to the onClick event handler of the associated link:

    dcsMultiTrack('DCS.dcssip', 'www.mozilla.org',
    'DCS.dcsuri', '/en-US/download',
    'WT.ti', 'Link: Download Firefox',
    'WT.z_convert', 'download_firefox',
    'WT.dl', 1)
  
Notice that this may seem redundant because we already implemented a dcsMultiTrack call to track the download click associated with the Scenario Analysis tracking.  In fact, it is both redundant and incorrect to make two dcsMultiTrack calls to track the same behavior.  So in this case, we can combine the dcsMultiTrack call into one:

    dcsMultiTrack('DCS.dcssip', 'www.mozilla.org',
    'DCS.dcsuri', '/en-US/download',
    'WT.ti', 'Link: Download Firefox',
    'WT.z_convert', 'download_firefox',
    'WT.dl', 1,
    'WT.si_n', 'Download Firefox',
    'WT.si_x', '2')
   
This last call will provide Webtrends with enough data to create both a Scenario Analysis report AND a Campaign Tracking report.  Once this data is captured within the Webtrends logfile, custom reports can be created in the OnDemand environment.  This will be the topic of the next Wiki entry.

DCS Tracking - How to Create a Report

Brad enter steps to create a report that shows DCS clicks and CTR here