Skip to content

TrackIt Data Overview

hikirsch edited this page Oct 21, 2010 · 2 revisions

TrackIt Data – Overview

The data portion of this plugin is the most essential part. There are 2 primary formats currently supported, JSON and XML. This describes the model around how TrackIt works and how the data is used.

All the data in TrackIt is comprised from many TrackEvents. A TrackEvent can be thought of as an action that you wish to track. This action could be anything, a user click event, a page load event, etc.

TrackEvent’s are defined by a unique key known as the track key. This key is a unique name to identify which set of variables should be reported. Some examples of good track key names would be “Homepage Load” and “Download PDF Link”.

TrackEvent’s also declare an event type that occured. This event can either be “pageView” or “click”.

Below is a basic JSON example of a trackEvent named “Homepage Load” that defines a pageView event.

{
    key: "Homepage Load",
    type: "pageView"
}

Below is a basic XML example of the same trackEvent.

<trackEvents>
    <trackEvent key="Homepage Load" type="pageView">
    </trackEvent>
</trackEvents>

Analytics Specific Data

To define specific variables that need to be sent to the report tool, they can be set directly inside a trackEvent. Extending the example above, we will now be setting the Omniture variable “pageName” as “Homepage”.

{
    key: "Homepage Load",
    type: "pageView",
    pageName: "Homepage"
}

And now the XML.

<trackEvents>
    <trackEvent key="Homepage Load" type="pageView">
        <pageName>Homepage</pageName>
    </trackEvent>
</trackEvents>