Enabling Segment.io - Appsembler

Enabling Segment.io

Create a new project at Segment.io

Grab the “Write Key” for the project.

In server-vars.yml, include:

#segment for lms
EDXAPP_SEGMENT_IO_LMS: true
EDXAPP_SEGMENT_IO_LMS_KEY: "<write_key>"
#segment for cms
EDXAPP_SEGMENT_IO: true
EDXAPP_SEGMENT_IO_KEY: "<write_key>"
#not sure what this does, or if this is the correct param
EDXAPP_TRACKING_SEGMENTIO_WEBHOOK_SECRET: "<write_key>"

If everything is configured correctly, when you view a page’s source, you should see something like:

<!-- begin Segment.io -->
<script type="text/javascript">  // Asynchronously load Segment.io's analytics.js library  
...
...
analytics.load("<write_key>");  
analytics.page();
...
...
</script><!-- end Segment.io -->