Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send identify events to Segment before page events from ecommerce #1121

Merged
merged 2 commits into from
Feb 3, 2017

Conversation

mikedikan
Copy link
Contributor

ECOM-6650

Calling the logging of the user to segment before calling the tracking function, so events are attributed to the correct user. Also, small cleanup of settings file.

@edx/ecommerce for review

Copy link

@AlasdairSwan AlasdairSwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 1 nit.

if (this.options.courseModel.get('courseId')) {
return this.buildCourseProperties();
pageData= this.buildCourseProperties();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: missing space between pageData and =.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit accepted

@clintonb clintonb requested a review from brianhw February 2, 2017 13:32
# ANALYTICS
# Specify a key to emit events to the corresponding Segment project. `None` disables tracking.
# See: https://segment.com/docs/libraries/python/
SEGMENT_KEY = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is unused, it should also be removed from edx/configuration; you may want to consult with Devops to see if any secure overrides need to be cleaned up.

Related: it's probably worth documenting how this is meant to be set up now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks @renzo for the suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikedikan mikedikan force-pushed the mdikan/track-user-before-tracking-page branch from 103d505 to d170c28 Compare February 2, 2017 16:30
@mikedikan
Copy link
Contributor Author

@AlasdairSwan please re-review

Copy link

@AlasdairSwan AlasdairSwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mikedikan mikedikan force-pushed the mdikan/track-user-before-tracking-page branch 2 times, most recently from 81f8b06 to 5865f1c Compare February 3, 2017 18:11
Remove the SEGMENT_KEY from settings, this value is now set in Django admin and the value existing in settings can lead to developer confusion and frustration (ask me how I know this)
ECOM-6650

Calling the logging of the user to segment before calling the tracking function, so events are attributed to the correct user.
@mikedikan mikedikan force-pushed the mdikan/track-user-before-tracking-page branch from 5865f1c to 3527d4a Compare February 3, 2017 18:46
@mikedikan mikedikan merged commit 87f52a8 into master Feb 3, 2017
@mikedikan mikedikan deleted the mdikan/track-user-before-tracking-page branch February 3, 2017 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants