Top
Integrating with Omniture analytics
  • 1 minute to read
  • Print
  • Dark
    Light

Integrating with Omniture analytics

  • Print
  • Dark
    Light

You can integrate Omniture analytics to analyze how your content is performing using Whatfix APIs. The following scripts can be inserted in advanced customization.

FunctionScript
Load the omniture tracking script

if(document.querySelector('[id*="_UIScmil1u"]').title == 'William Chua') {

    var head = document.getElementsByTagName('head');

    var script = document.createElement("script");

    script.setAttribute("src", "https://whatfix.com/omniture/AppMeasurement.js");

    script.setAttribute("type", "text/javascript");

    head[0].appendChild(script);

your title goes here
Replace the URL above with your Omniture URL. 


Common handler to send whatfix events to omniture
window._wfx_settings.onEvent = function(page,flow_id) {

        s.pageName=page;

        s.channel="direct";

        s.prop1=flow_id;

        var s_code=s.t();if(s_code)document.write(s_code);

    };

Choose subset of whatfix events that you want to forward to Omniture and call the common handler

    window._wfx_settings.onStart = function(event) {window._wfx_settings.onEvent('/flow/live/start', event.flow_id);};

    window._wfx_settings.onShow = function(event) {window._wfx_settings.onEvent('/flow/live/show' + event.step, event.flow_id);};

    window._wfx_settings.onEnd = function(event) {window._wfx_settings.onEvent('/flow/live/end', event.flow_id);};

    window._wfx_settings.onMiss = function(event) {window._wfx_settings.onEvent('/flow/live/miss', event.flow_id);};

    window._wfx_settings.onClose = function(event) {window._wfx_settings.onEvent('/flow/live/close', event.flow_id);};

}

OR Forward ALL events to Omniture

window._wfx_settings.tracker = {

        track:onEvent(event.event_name, event.flow_id);

};

Was this article helpful?