Hi, I need to use a custom timestamp like 2020-09-18T17:56:53.679-05:00 With the time zone. I created a UDO variable _timestamp (UDO) And added a javascript extension // Type your JavaScript code here... b._timestamp = (function() {
var now = new Date();
var tzo = -now.getTimezoneOffset();
var dif = tzo >= 0 ? '+' : '-';
var pad = function(num) {
var norm = Math.abs(Math.floor(num));
return (norm < 10 ? '0' : '') + norm;
};
return now.getFullYear() + '-' + pad(now.getMonth()+1) + '-' + pad(now.getDate()) + 'T' + pad(now.getHours()) + ':' + pad(now.getMinutes()) + ':' + pad(now.getSeconds()) + '.' + pad(now.getMilliseconds()) + dif + pad(tzo / 60) + ':' + pad(tzo % 60);
}()); Linked to Google Analytics mapped variables _timestamp to a custom dimension. But the _timestamp keeps the initial value, I tried to use tealium_timestamp_local or tealium_timestamp_utc but we need the timezone, I need a way to create a similar function that is triggered when any GA action is fired. Thank you!
... View more