Sending custom data with Multitrack
  • 06 May 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Sending custom data with Multitrack

  • Dark
    Light
  • PDF

Article summary

The MultiTrack function lets you track events other than page loads.

Multitrack is flexible and allows you to track just about any type of event you want. Here are just a few examples of the events you can track:

  • Virtual page views
  • File downloads
  • The clicking of offsite links
  • The clicking of anchor links
  • Ad views

Here are a couple of multitrack examples:

Basic Mulitrack call:

Webtrends.multiTrack({
                        argsa: ["DCS.dcsuri", "/home/tab_view_history, "WT.dl", "0"]
                    })

Using Multitrack from jQuery:

$(document).ready(function () {
                $("#Webtrends_com").click(function (e) {
                    Webtrends.multiTrack({
                        argsa: ["DCS.dcsuri", "/", "WT.dl", "24", "WT.ti", "Offsite:webtrends.com"]
                    });
                });
            });

Sending custom data with Multitrack

When calling multitrack, it is very common to pass in custom key-value pairs to get added to the standard set of key-value pairs sent to Webtrends collection servers on every track event. This custom data is used for custom reporting and/or overriding the values from Webtrends' standard set of data.

There are three methods of passing custom data to MultiTrack: using the args object field, the argsa array field or passing the data as arguments to Multitrack. The args object should be a JSON object in the form { "key" : "value" }, argsa array methods uses an array in the form[ "key1", "value2", ... "keyN", "valueN" ], and when passing the data as arguments to Multitrack, use the form multiTrack([ "key1", "value2", ... "keyN", "valueN" ]).

Examples:

Using args object:

Webtrends.multiTrack({
        args: { "DCS.dcsuri" : "/Home/Account/History", 
                "WT.dl" : "0"}
});

Using argsa array:

Webtrends.multiTrack({
        argsa: ["DCS.dcsuri", "/Home/Account/History", "WT.dl", "0"]
});

Passing custom data as arguments:
Webtrends.multiTrack("DCS.dcsuri", "/FAQ/Search", "WT.oss", searchForm.elements["phrase"].value );


Was this article helpful?