timestamp variable manually sets the timestamp of the hit for timestamp-enabled report suites.
Do not use this variable if your report suite is not explicitly configured to accept timestamped hits. AppMeasurement automatically sets the time of a hit for report suites that do not support timestamped hits. If you send a hit with this variable to a report suite that does not support timestamps, that data is permanently lost.
Timestamp is mapped for Adobe Analytics under the XDM field
xdm.timestamp. This field only supports Unix time.
There is not a dedicated field in the Adobe Analytics extension to use this variable. Use the custom code editor, following AppMeasurement syntax.
// 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();
Dates and times expressed in ISO 8601 can take several different forms. Adobe does not support all features in ISO 8601.
20200101T000000Zare both valid.
The following are valid example ISO 8601 values in the
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