segmentio / analytics-node

The hassle-free way to integrate analytics into any node application.

Home Page:https://segment.com/libraries/node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

context.device.token ignored

joseconstela opened this issue · comments

While trying to submit iOS fcm token to segmentio (and therefore to Customer.io) I'm not able to get the device token registered correctly in Customer.io.

Below the code used (all other events, etc are being tracked/recordered properly).

segmentIo.identify({
  userId: '123',
  traits: {
    name: 'Michael Bolton',
  },
  context: {
    device: {
      token: "<an actual valid fcm token>",
      type: "ios",
    }
  }
})

Solved.

Found that the default mapping of event to create a device on Customer.io was for "Application Installed" (...). So just had to change that to my own event name (...).