Search code examples
javascriptwebtrends

Configure webtrends reports for banners clicked with multiple values


If you guys could help me configure the admin portion, then I would be grateful.

When a banner is clicked, the following function is called

 dcsMultiTrack('DCSext.Carousel','Home','WT.ti','Home',
 'WT.pc','Banner;Position','WT.pn_sku',tempPC,'WT.tx_u',
 tempQuantity,'WT.tx_s',tempQuantity);

How do I setup a report to that will show the results in a three column report, showing the Carousel's location, the Banner clicked and Position of the banner?

I do not want to use dimensions, because it produces a drill-down view.


Solution

  • First, create a dimension which is listening for a custom query parameter. To make things simple: param1, param2, param3 - one dimension for each parameter. Be sure that each dimension is within the same group - makes it easy to find in the next step.

    Second, create a report for each dimension that you created for each custom parameter.

    Third, create a custom drilldown dimension.

    Forth, create a report that uses the drilldown dimension

    That's the admin side and here is come code to help send the parameters to webtrends.

    $("#someBtn").bind("mousedown", function(){
    

    Use mousedown listeners to avoid a known issue with Firefox and Webtrends.

    var mT7 = setTimeout("myWebtrendsFunction()", 50);
    

    Why set a timeout, because Firefox has a known issue with Webtrends when a user's click may cause the user to go to another page. Avoids the "NS_ERROR" "Aborted" issue from coming up.

    var myWebtrendsFunction = function(){
    tempZ[0] = $("#yourElem").val();
    if($("#yourElem").val() == "Enter your zip code" || $("#yourElem").val() == "Enter your Zip code" || $("#yourElem").val() == "Enter Zip code" || $("#yourElem").val() == "Enter your Zip code" || $("#yourElem").val() == "Enter Zip code" || $("#yourElem").val() == ""){
    
    }else{
        var wtArgs = ['WT.dcs_id', 'dcsidhere', 'DCSext.param1', varArray[varArray.length-2], 'DCSext.param2', varArray[varArray.length-1], 'DCSext.param3', tempZ[0]];
        dcsMultiTrack.apply(this, wtArgs);
    }
    

    }

    The param1, param2, param3 are the custom query parameters that you created within the three dimensions.

    Hope that helps someone and this is with webtrends 9