Adobe omniture - trying to fire evar and events in the s_code file doesn't work

486 views Asked by At

I have successfully implemented on-click events tracking on Omniture. s.eVar62 and s.prop62 fires with a text string each time a link is clicked that has the tracking code enabled.

I want to extend this functionality in the s_code to fire another evar (s.eVar76) when on-click is fired with a specific text value.

console.log('s.eVar62 is ' + s.eVar62);
// track existing customers
if (s.eVar62) {
    if (s.eVar62.indexOf('credit card login') > -1) {
        s.eVar76 = 'credit card customer';
        if (s.events) s.events = s.apl(s.events, "event104", ",", 2);
    }
    if (s.eVar62.indexOf('super member login') > -1) {
        s.eVar76 = 'super member customer';
        if (s.events) s.events = s.apl(s.events, "event105", ",", 2);
    }
    if (s.eVar62.indexOf('super employer login') > -1) {
        s.eVar76 = 'super employer customer';
        if (s.events) s.events = s.apl(s.events, "event106", ",", 2);
    }
    if (s.eVar62.indexOf('home loans login') > -1) {
        s.eVar76 = 'home loans customer';
        if (s.events) s.events = s.apl(s.events, "event107", ",", 2);
    }
    if (s.eVar62.indexOf('savings login') > -1) {
        s.eVar76 = 'savings customer';
        if (s.events) s.events = s.apl(s.events, "event108", ",", 2);
    }
    console.log('eVar76 is ' + s.eVar76);
    console.log('s.events are ' + s.events);
}

in the code there, you can see I've logged things to the console to see what's happening.

I seem to be seeing positive results in the console but the values don't get tracked in the reporting. As in, in the reporting, s.eVar76 is empty even though evar62 is tracking properly with the correct strings.

Can anyone point me in the right direction as to what I am doing wrong? Thanks.

UPDATE 2015-06-12

Based on some members' comments and suggestions, I have edited the s_code again to this:

// track existing customers
if (s.eVar62) {
    s.linkTrackVars += ',eVar76';
    if (s.eVar62.indexOf('credit card login') > -1) {
        s.linkTrackEvents += ',event104';
        s.eVar76 = 'credit card customer';
        if (s.events) s.events = s.apl(s.events, "event104", ",", 2);
    }
    if (s.eVar62.indexOf('super member login') > -1) {
        s.linkTrackEvents += ',event105';
        s.eVar76 = 'super member customer';
        if (s.events) s.events = s.apl(s.events, "event105", ",", 2);
    }
    if (s.eVar62.indexOf('super employer login') > -1) {
        s.linkTrackEvents += ',event106';
        s.eVar76 = 'super employer customer';
        if (s.events) s.events = s.apl(s.events, "event106", ",", 2);
    }
    if (s.eVar62.indexOf('home loans login') > -1) {
        s.linkTrackEvents += ',event107';
        s.eVar76 = 'home loans customer';
        if (s.events) s.events = s.apl(s.events, "event107", ",", 2);
    }
    if (s.eVar62.indexOf('savings login') > -1) {
        s.linkTrackEvents += ',event108';
        s.eVar76 = 'savings customer';
        if (s.events) s.events = s.apl(s.events, "event108", ",", 2);
    }
}

but still no luck. Any more ideas?

0

There are 0 answers