Skip to content

Instantly share code, notes, and snippets.

{
"$defs": {
"Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
@jlee9595
jlee9595 / identify.js
Last active January 24, 2020 22:09
Segment->Iterable Identify Update
exports.identify = function (identify) {
const traits = formatDates(Object.assign(identify.traits({
phone: 'phoneNumber',
timestamp: 'profileUpdatedAt'
}), { met: identify.created() }))
del(traits, 'id')
const contextWithExtraFields = Object.assign(identify.context(), {
timeZone: identify.timezone(),