Omniture Implementation and JavaScript Exercises

Text Color Key: Exercise questions Response/Answer Code Code result

Section 1:

Deployment Scenario:

The client is a large utility (electric utility) located in California interested in taking their SiteCatalyst deployment to the next level. They're using a competing SiteCatalyst product and have decided to re-implement SiteCatalyst across their site using dynamic ASPX included footers and static server-side includes.

Their site is partitioned into two main categories of pages: The management has asked that the following business questions be answered using SiteCatalyst online reports. Please describe how you would use SiteCatalyst to answer each question:

Other questions:

Section 2

Step 1

Exercises:

  1. Define a global JSON object (using JSON syntax) that contains the following elements:
  2. Write a function that accesses the global object defined in #1 above.
  3. Modify your function so that it can be called using the 'eval' syntax and contextually add a form field-value that contains a reference to the JSON object that contains the products attributes. So in other words, I should be able to type in the name of any globally-defined JSON object I want to process into an HTML form. When I hit a form button, that button will execute the JavaScript function (written in section 2 above) using "eval" syntax and process the global JSON object from the form field.
    Enter a JSON object:   Test products: 'brush', 'paint', 'canvas'.
    Object Attribute: [ ]        Product String: [ ]


    CODE:
    onClick event for RUN button (also works on Enter keypress in text box)
    onclick="JavaScript: eval('evalTest(document.getElementById(\'vTest\').value)');"

    JavaScript
    ///create local copy
    function evalTest(x) {
    ///check if entered value is in JSON
    if(globalJSON[0].products.indexOf(x) == -1) alert("JSON object is not valid");

    //clear localJSON in case of rerun
    if(typeof localJSON =='undefined'){
    var localJSON = jQuery.extend(true, {}, globalJSON);

    ///Add leading semi-colan to each product
    for (var i = 0; i < localJSON[0].products.length; i++) {
    var prodTemp = localJSON[0].products[i];
    if(prodTemp==x) var c=i;
    localJSON[0].products[i]= ";" + localJSON[0].products[i];
    localJSON[1].merchandising[prodTemp] = ";" + localJSON[1].merchandising[prodTemp];}}

    ///update results on page
    document.getElementById("eValR").innerHTML = "Object Attribute: " + localJSON[1].merchandising[x].replace(';','') + " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Product String: " + localJSON[0].products[c] + localJSON[1].merchandising[x];};

  4. Demonstrate how to defend against cross-site scripting attacks that might be used if you call an eval statement from #3 above.
    Not very experienced with this. I did some research to brush up on the concepts, but not something I'm fluent in yet.

  5. Write a regular expression that can extract the second-level domain (something.com) from a full URL.
    To get the true second level domain:
    Second Level Domain:

    CODE:
    ///second level domain
    function sDomain() {
    document.getElementById("s_domain").innerHTML = "Second Level Domain: " + document.domain}


    Enter a URL, then a number between 1 and 10 to get a dynamic domain level.
    URL:     LEVEL:
    Fourth Level Domain: three.two.one.com <example>

    CODE:
    /////dynamic domain level
    function tdomain() {
    var dg = ['First','Second','Third','Fourth','Fifth','Sixth','Seventh','Eight','Ninth','Tenth'];
    td = document.getElementById("t_entry").value-1;
    (document.getElementById("u_entry").value==""||document.getElementById("t_entry").value=="")?alert("Please fill in both entries."): ta = document.createElement('a'),
            ta.href = document.getElementById("u_entry").value,
            (ta.hostname)?te = ta.hostname.replace(/http:(s?)|www(2?).|\//ig,""):te=document.getElementById("u_entry").value,
            tc = (te.split(".").length - 1),
            (tc>td-1)?document.getElementById("t_domain").innerHTML = dg[td] + " Level Domain: " + te.split('.').slice(tc-td).join('.'):alert("Not that many levels in entered URL.");}

Section 3

  1. Perform an audit of a retail or travel site of your choice to build a Solution Design Reference that details the current state of their analytics implementation.

    This first Excel file is a review of the current Omniture implementation on abercrombie.com. I chose this site after having been involved in the development of a small section of it recently. I was pulled in literally a couple of days before the Club section launched to 'fix' the tagging plan. What made it a challenge is not only did I have no insights into the background of the project, but the developers (in Buenos Aires) had never implemented Omniture before. The tagging plan (put together by our group) was also pretty messy with lots of questionable things going on. So between gathering information about the project, reworking the tagging plan, and helping train the developers on Omniture requirements, it was a rather frantic week. I ended up prioritizing the Omniture tagging between Need by Launch, and what could wait until the days following launch. Throughout this process I noticed there were tagging issues with the main site, and a lack of good coordination between the tagging plan I inherited for the Club section and what I was seeing on the main site.

    This first file is an review of the full site. It includes a breakdown of the Events, eVars, and props that I could see firing. I've also detailed a number of issues which I found; most of these are technical errors, but a couple are related to what I see as issues with how the SC data is structured. This is not a completely comprehensive site report, as I went through much of the site, but not every single page. I tracked the Products tags up to but not including the actual purchase, so the last steps in the purchase path were not tested.

    Review
  2. Create a technical specification document or deployment guide detailing a recommendation, why/how/what to expect from your recommendation, and how to implement it.

    This is an updated SDR including recommended changes (highlighted in orange). The original plan looks to have been pretty solid overall, so I didn't make a great deal of changes. Having had a few follow up conversations with the client on reporting, some of the recommendations are based upon the difference between what the original plan outlines and what their expectations were. One of the most important aspects of any implementation is making sure you clearly understand the client's needs and expectations, and structure the data accordingly. Having the technical aspects working properly is of course always important. But even if the technical and coding stuff is perfect, if the client is not getting what they need the implementation will be flawed.

    NOTE: This is not as comprehensive as a normal document would be, as it's more of an outline without getting into too much of the coding, such as function calls for plug-ins. It also includes a Charles tag converter which I built. I've found this to be helpful during the QA testing phase, especially if the tester is not fluent in the SDR.

    Updated SDR

Additional Examples

NOTE: Some data may have been dummied for confindentiality reasons.

  1. Sample Presentation Deck for the following situation:

    PDF includes link in Annex to more detailed list of Recommendations.

    Presentation Link
  2. Presentation for Results of Change to an online Shopping List Builder
  3. Resume