timestamp
变量可手动为启用了时间戳的报表包设置点击的时间戳。
如果您的报表包未明确配置为接受带有时间戳的点击,请勿使用此变量。AppMeasurement 会为不支持带有时间戳的点击的报表包自动设置点击时间。如果使用此变量将点击发送到不支持时间戳的报表包,则该数据将永久丢失。
时间戳为 已为Adobe Analytics映射 在XDM字段下 xdm.timestamp
. 此字段仅支持Unix时间。
Adobe Analytics 扩展程序中没有专门的字段来使用此变量。 按照 AppMeasurement 语法使用自定义代码编辑器。
s.timestamp
变量是一个包含点击日期和时间的字符串。有效的时间戳格式包括 ISO 8601 和 Unix 时间。
// Timestamp using ISO 8601
s.timestamp = "2020-01-01T00:00:00Z";
// Timestamp using Unix timestamp
s.timestamp = "1577836800";
// Automatically get the current Unix timestamp
s.timestamp = Math.round(new Date().getTime()/1000);
// Automatically get the current ISO 8601 timestamp
s.timestamp = new Date().toISOString();
以 ISO 8601 表示的日期和时间可以采用几种不同的形式。Adobe 并不支持 ISO 8601 中的所有功能。
T
隔开。2020-01-01T00:00:00Z
和 20200101T000000Z
均有效。以下是 timestamp
变量中的有效 ISO 8601 示例值:
2020-01-01T00:00:00+00:00
2020-01-01T00:00:00Z
2020-01-01T00:00:00
2020-01-01T00:00
20200101T000000+0000
20200101T000000Z
20200101T000000
20200101T0000