Expand my Community achievements bar.

SOLVED

function s.t() returns undefined.

Avatar

Level 1

function s.t() is returning undefined and hence getting s_code = undefined. Not able to communicate to analytics server.

the steps we followed as specified in implementation document are -

1.Download AppMeasurement.js for JavaScript and the Visitor ID service.

2.Configured the Visitor ID service.

We have used the correct values as provided by Adobe.

var visitor = new Visitor("XXXXXXXXXXXXXXXXXX@AdobeOrg");

visitor.trackingServer = "yyy.xxx.2o7.net";

visitor.trackingServerSecure = "yyy.xxx.2o7.net";   //note -  considering "yyy" as visitor namespace for s.visitorNamespace 

3.Updated the AppMeasurement.js as:

• s.account="xxxxxx"   // note I have put RSID here.
• s.trackingServer="yyy.xxx.2o7.net"
• s.visitorNamespace = "yyy.xxx.2o7.net"

s.visitor = Visitor.getInstance("yyy")  //(note - not MCOrg ID)

4.Host AppMeasurement.js and VisitorAPI.js.

5.Reference AppMeasurement.js and VisitorAPI.js on all site pages.

Layout page in mvc reference to VisitorAPI.js first and then AppMeasurement.js above any of the javascript files.

6.Update and deploy page code

we implemented the below on Index page.

<script type="text/javascript">
    s.pageName = document.title
    s.server = ""
    s.channel = ""
    s.pageType = ""
    s.prop1 = ""
    s.prop2 = ""
    s.prop3 = ""
    s.prop4 = ""
    s.prop5 = ""
    /* Conversion Variables */
    s.campaign = ""
    s.state = ""
    s.zip = ""
    s.events = ""
    s.products = ""
    s.purchaseID = ""
    s.eVar1 = ""
    s.eVar2 = ""
    s.eVar3 = ""
    s.eVar4 = ""
    s.eVar5 = ""
    var s_code = s.t(); if (s_code) document.write(s_code)
    alert('s_code - ' + s_code);
</script> 

Please suggest if we are missing something as s.t() is returning undefined.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Pradeep,

I would suspect that the following:

1. First, check if s_code has loaded on the page or not.

2. If the s_code is present on the page load, then I would suspect that the s_code is throwing some JS error which can make 's' variables 'Undefined'. Please check for any JS error which might block this.

Hope this helps.

Regards,

Harsh Kabra |  Adobe Certified Expert: Digital Analytics® & SiteCatalyst Implementation & Reporting®

View solution in original post

2 Replies

Avatar

Level 5

Hi

Please check the file paths from page source.

Please refer to the link : http://microsite.omniture.com/t2/help/en_US/sc/implement/impl_troubleshooting.html

Regards

Devinder

Avatar

Correct answer by
Level 4

Hi Pradeep,

I would suspect that the following:

1. First, check if s_code has loaded on the page or not.

2. If the s_code is present on the page load, then I would suspect that the s_code is throwing some JS error which can make 's' variables 'Undefined'. Please check for any JS error which might block this.

Hope this helps.

Regards,

Harsh Kabra |  Adobe Certified Expert: Digital Analytics® & SiteCatalyst Implementation & Reporting®