This theme component allows you to send data about your site’s usage to Segment.

The component supports calling segment.identify when a user first logs on to the site. For site’s using SSO, you can either send the user’s Discourse ID, or their external_id to Segment. The component allow you to track views of the Discourse latest, categories, category, tag, and topic pages. It also allows you to track topic and post creation, likes, flags, and bookmarks.


Follow the guide to install the component. Use to install it directly from its Git repository. You can also download it from here.


Add your Segment Write Key to the segment write key setting. Then select which events you would like to track:

image: 599x500

The component extends your site’s content security policy to add

Let me know of any issues you run into with the component, or if there are ways that the data sent to Segment could be improved.