Native SiteCatalyst calls along with Tealium

sam_tsai
Rookie Contributor
sam_tsai
I ran into an issue where SiteCatalyst calls made natively (direct calls to `s.t()` and `s.tl()`) trigger as 3rd-party cookie calls and therefore end up on the 3rd-party tracking URL. (From the Tealium note: "For 3rd-party tracking the default server loaction is 122 (122.2o7.net). For 112.2o7.net data collection servers, set server and secure server directly mysite.112.2o7.net"). I need these to trigger as 1st-party so our reporting team will be able to collect the data. I found that I can hard-code: s.trackingServer and s.trackingServerSecure to any code snippets that are making native calls and this would correctly trigger as 1st-party. I know that ultimately, best practice, would be to refactor to use `utag.track` but the project timeline didn't allow for that and the turnaround needs to be quick for the current implementation. This wasn't a problem before we implemented Tealium so our thought is that some place scope is being lost for the s.trackingServer and s.trackingServerSecure variables (as in, they're not globally available in the `s` variable). I can post a sample code snippet if that would be helpful. Thanks, Sam
3 REPLIES 3
Highlighted

Native SiteCatalyst calls along with Tealium

jared_hislop
Employee Emeritus
jared_hislop
Sam, Do you have a page where I can see this happening? I have used s.t and s.tl many times to call SiteCatalyst directly, and have never ran into this issue. If you can provide a page I'll be able to see if something is overwriting the tracking server config.

Native SiteCatalyst calls along with Tealium

sam_tsai
Rookie Contributor
sam_tsai
If you go to http://www.ae.com and add to bag there's an ajax code snippet that fires and uses the s.t(). Using Chrome inspector (with source maps enabled): Line 106 in bagbar-v5.js ``` asap("omniture").then(function() { var e = s_gi(utag_data.report_suite), a = "scAdd,event7,event9", t = "scRemove,event8,event10", n = !1, i = !1; e.events = "scView", e.products = "", null != b.omnitureData && ("addedProducts" in b.omnitureData && (n = !0, $.each(b.omnitureData.addedProducts, function(a, t) { e.products += ";" + t[0] + ";;;event7=" + t[2] + "|event9=" + ("" + $.forceFloat(t[1]).toFixed(2)) })), "removedProducts" in b.omnitureData && (i = !0, $.each(b.omnitureData.removedProducts, function(a, t) { e.products += ";" + t[0] + ";;;event8=" + t[2] + "|event10=" + ("" + $.forceFloat(t[1]).toFixed(2)) })), e.events = n && i ? a + "," + t : n ? a : i ? t : "scView", $.extend(e, b.omnitureData), e.t()) }) e.t() is the s.t() call. Thanks, Sam

Native SiteCatalyst calls along with Tealium

jared_hislop
Employee Emeritus
jared_hislop
Hey Sam, In the above code this line: var e = s_gi(utag_data.report_suite), Is erasing the trackingServer so SiteCatalyst is defaulting to the 3rd party cookie 112.2o7.net. Unfortunately, Tealium doesn't have control over this as it is happening within the s_gi function which is the native SiteCatalyst obfuscated code. Since the SiteCatalyst library, in this case from utag.1.js, has already loaded with the configs you should be able to just exclude that line of code and call s.t() without it. The same config settings (s_account, trackingServer, etc) that were set on the page will again be used in this s.t() call. Your work around of setting s.trackingServer will work since the s_gi() function is erasing it, but again you can get rid of the line calling s_gi(). The other thing to note is the props and eVars are also getting overwritten so in the above example of calling s.t() only props1-4 are getting passed. However, if you remove the var e=s_gi() line of code you will get additional variables that were set on the previous page. One day it would be best to remove the s.t() calls with utag.view() and the s.tl() calls with utag.link(). Swapping these functions will allow you to make changes to these server calls directly within Tealium instead of needing to alter the page code again. Hope this helps.