Add Timezone as a Heap User Property via Snapshots

To further enrich your Heap user data, you can capture users’ timezones. The Snapshot below adds the user’s current timezone as a Heap user property by triggering Heap’s client-side [heap.addUserProperties()]( API. You can have this attached to any event that triggers at least once for users, like a pageview.

JavaScript Snapshot:

(function() {
    var tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
        "Timezone": tz