0

We are adding custom properties on contact during the track events, per this documentation:

https://segment.com/docs/integrations/hubspot/

analytics.track(user_id='YOUR_USER_ID', event='Bought Item', properties={
    'email': 'peter@initech.com',
}, context={
    'traits': {
        'firstname': 'Peter',
        'lastname': 'Gibbons'
    }
})

somehow the properties are not getting set. Has anyone encountered such a problem?

{
  "anonymousId": null,
  "context": {
    "ip": "199.230.10.198",
    "library": {
      "name": "analytics-python",
      "version": "1.2.5"
    },
    "traits": {
      "requested_quote": true
    },
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14"
  },
  "event": "Requested quote quantity",
  "integrations": {},
  "messageId": "390d411e-8c7e-492e-ad60-ca64d5a07137",
  "properties": {
    "email": "test+1121@gmail.com",
    "quantity": 11
  },
  "timestamp": "2016-11-21T23:32:18.949Z",
  "type": "track",
  "userId": "412",
  "writeKey": “xxxx",
  "sentAt": "2016-11-21T23:32:19.574Z",
  "receivedAt": "2016-11-21T23:32:19.637Z",
  "originalTimestamp": "2016-11-21T23:32:18.886817+00:00"
}

{
  "anonymousId": null,
  "context": {
    "ip": "199.230.10.198",
    "library": {
      "name": "analytics-python",
      "version": "1.2.5"
    },
    "traits": {
      "placed_order": true
    },
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14"
  },
  "event": "Submitted payment information",
  "integrations": {},
  "messageId": "dbefc952-1a6c-431a-94aa-e592ec50a7db",
  "properties": {
    "email": "test+1121@gmail.com"
  },
  "timestamp": "2016-11-21T23:53:06.025Z",
  "type": "track",
  "userId": "412",
  "writeKey": “xxxxx",
  "sentAt": "2016-11-21T23:53:06.506Z",
  "receivedAt": "2016-11-21T23:53:06.572Z",
  "originalTimestamp": "2016-11-21T23:53:05.959906+00:00"
}
mikebz
  • 3,277
  • 8
  • 37
  • 50
  • Hey Mike! Have you created that contact property (`placed_order`) in Hubspot's Contact Settings UI? We only forward traits for which we've found matching existing fields in your HubSpot portal. – Chris Sperandio Nov 22 '16 at 02:40
  • yup, the placed_order is created. Anything else I can try? – mikebz Nov 23 '16 at 01:09

0 Answers0