We are using utag loader version 4.49. We use an external privacy/consent vendor and use a snippet of JS to inform Tealium iQ when consent status has changed. Our call to utag.gdpr.setPreferencesValues is failing internally when the setPreferencesValues function calls utag.gdpr.getTraceId. The getTraceId method is undefined, even though this is internal Tealium code calling it! Has anyone encountered this before? I am reluctant to make the move to 4.50 or 4.51 unless we know this is resolved. The utag.gdpr.setPreferencesValues implementation is below. The code is blowing up four lines from the bottom in the call to getTraceId. Thank you, Christopher setPreferencesValues: function(categories, noCollect) { var cookie_data = utag.gdpr.getCookieValues(), lookup = {}, i, rgx = /\D/, names = utag.gdpr.getCategories(), chosen_list = [], consent_seen = false, decline_seen = false, crgx = /c\d/, fld; try { for (i = 0; i < names.length; i++) { lookup[names[i]] = 'c' + (i + 1); } for (var cat in categories) { if (!categories.hasOwnProperty(cat)) { continue; } if (cat.match(rgx)) { cookie_data[lookup[cat]] = categories[cat]; if (categories[cat] != 0) { chosen_list.push(cat); } } else { cookie_data["c" + cat] = categories[cat]; if (categories[cat] != 0) { chosen_list.push(names[cat - 1]); } } } for (fld in utag.loader.GV(cookie_data)) { if (fld.match(crgx)) { if (cookie_data[fld] != 0) { consent_seen = true; } else { decline_seen = true; } } } cookie_data["ts"] = new Date().getTime(); cookie_data["consent"] = consent_seen; utag.gdpr.setCookie(cookie_data); } catch (e) { utag.DB(e) } if (noCollect) { return; } var xhr = new XMLHttpRequest(); xhr.open("POST", "https://collect.tealiumiq.com/event"); var tealiumEvent = '"tealium_event":'; var consentCategories = '"consent_categories":'; if (decline_seen) { if (consent_seen) { tealiumEvent += '"grant_partial_consent",'; consentCategories += JSON.stringify(chosen_list) + ","; } else { tealiumEvent += '"decline_consent",'; consentCategories += "[],"; } } else if (!decline_seen && consent_seen) { tealiumEvent += '"grant_full_consent",'; consentCategories += JSON.stringify(utag.gdpr.getCategories(true)) + ','; } var traceId = utag.gdpr.getTraceId(); var traceIdInfo = traceId ? '"cp.trace_id":"' + traceId + '",' : ""; var visitorId = utag.gdpr.setVisitorId(); xhr.send('{"tealium_account":"logitech",' + '"tealium_profile":"' + (utag.gdpr.eventProfile || "main") + '",' + tealiumEvent + consentCategories + '"policy":"gdpr",' + traceIdInfo + '"tealium_visitor_id":"' + visitorId + '"}'); }
... View more