...
That code will always send a segment event, for both instructor paced and self paced courses, even when your experiment is only interested in self paced courses. You can always do a filter on your analytics to cut them out. But it’s easier if you just reorder it:
Code Block | ||
---|---|---|
| ||
# Correct way, copy and paste at will if course.self_paced and EXAMPLE_FLAG.is_enabled(course_key): # experiment path |
...