Store Attribute based on an EventUpdated 21/04/2020


This snippet shows how you can write an attribute in the User profile when a specific event is received


// Loop over each event in this batch
events.map(e => {
  // If the right even happens
  if (e.event === "Added Picture"){
    const { tags } = e.properties;
    // Set a trait on the User
    hull.traits({
      has_added_picture: true
      picture_tags: tags
    })
  }
});