Segment Event Logging

Ask the Community

Get analytics directly into your Segment workspace


Background #

After adding Cord to your website, you may be interested in running some analytics. We use Segment in order to log our events. The team at Segment is working on a solution that will allow us to offer partners relevant time.

In the meantime, please contact your Cord contact for a secure way to provide us your Segment write key. Here's how you can locate your write key.

Schema #

JSON:
{
  "event": "cord-[event-name]",
  "userId": "USER_ID",
  "properties": {
    "location": "http://...",
    "group_id": "GROUP_ID"
    // other, event-specific properties
  }
}
{
  "event": "cord-[event-name]",
  "userId": "USER_ID",
  "properties": {
    "location": "http://...",
    "group_id": "GROUP_ID"
    // other, event-specific properties
  }
}
Copy

All our Segment events start with cord-. This will enable you to use an existing source if you to choose to do so, without the event schemas conflicting. However, we recommend creating a new Segment source for these purposes.

All events include the user ID you have provided us, as well as two permanent properties:

Property 
Description 
location
the URL where the event happened
group_id
the group ID the user was logged in as

Events #

Event 
Description 
select-profile
the user logs in by selecting a profile from the list.
create-new-profile
a new profile is created (this flow is not hit when a new Slack user joins).
click-upgrade-plan
the user clicks the Upgrade Plan button in the profile selection flow.
update-profile
the user updates their name or profile photo.
navigate-to
the user navigates around the Cord tabs; the cord_locationproperty will contain the tab to which they navigated.
render-sidebar-open
the sidebar renders on a new page for the first time in its opened state.
connect-service-started
the user starts a third party service connect flow; the serviceproperty will contain the service the user is connecting; one ofslack, jira, asana, linear.
connect-service-successful
the third party service connect flow completes successfully; contains the serviceproperty.
connect-service-failed
the third party service connect flow did not complete; contains the serviceproperty, as well as a reasonproperty will contain the reason for the failure; one of erroror cancelled.
disconnect-service
the user has disconnected a third party service; contains theserviceproperty.
hover-for-presence
the user hovers over the facepile at the top to check the presence of their teammates.
insert-mention
the user adds an @mentioned person to a draft message.
insert-assignee
the user adds a task assignee to a draft message.
message-send
the user clicks the send message button.
message-updated
the user updates a message.
message-deleted
the user deletes a message.
message-delete-undone
the user clicks the undo button on a message delete.
create-task
the user sends a message which contains a new task
remove-task
the user explicitly removes a task from a message.
thread-resolved
the user clicks the the "Resolve thread" button.
thread-unresolved
the user clicks the "Reopen" button to unresolve a thread.
subscribed-to-thread
the user clicks the "Subscribe to thread" button.
unsubscribed-from-thread
the user clicks the "Unsubscribe from thread" button.
toggle-sidebar-visibility
the user clicks the launcher; will have property to = false if closed, or to = true if opened
logout
the user clicks the sign out button.

Properties #

Some events may contain some additional information which would appear in the properties field of the event:

Property 
Description 
method
which method was used for the action; one of composer-text, on-it-reaction.
task_provider
which task provider was used for the task; one of cord, jira,asana, linear.
mentions
how many users were mentioned in the message.
attachments
how many attachments were there in the message.
annotations
how many annotations were there in the message.
new_thread
was the message a new thread or part of an existing thread.
cord_location
which part of Cord did they trigger the event; one of inbox,chat.
thread_id
the ID of the thread. A new thread will not have an ID.

Not finding the answer you need? Ask our Developer Community

Ask Cordy