currentTimestamp β GTM Variable Template for Date
When to Use This
Section titled βWhen to Use ThisβDate Formatting
Format and transform date values into human-readable or machine-readable strings.
Date & Time
Calculate durations, differences, and time-based operations on date values.
Examples
Section titled βExamplesβReturns current timestamp
OUTPUT
""
GTM Configuration
Section titled βGTM ConfigurationβThis is what you'll see when you open this variable in Google Tag Manager.
Read-only Preview
currentTimestamp
This function takes no parameters.
Related Variables
Section titled βRelated VariablesβSame category: Date
Under the Hood
Section titled βUnder the Hoodβπ View Implementation Code
/*** Returns the current timestamp in milliseconds.*** @returns {number} The current timestamp in milliseconds since epoch.** @framework ggLowCodeGTMKit*/const getTimestampMillis = require('getTimestampMillis');
// ===============================================================================// currentTimestamp - Direct mode// ===============================================================================
return getTimestampMillis();π§ͺ View Test Scenarios (1 tests)
β
'[example] Returns current timestamp'