Closed iref closed 6 years ago
@joshsmith please let me know if these changes match what we discussed in #1307 .
I added direction to tracked events. I moved project user tracking to controller. It allows us to create events name and payloads without changes to analytics api, which wouldn't be possible if we kept tracking in plug
(SegmentTraitsBuilder.build
function would need action and current user as additional parameters passed from plug) these changes aren't required by other implicitly tracked events and would complicate api. It also helps with #927.
@iref That was a good call. We're actually gradually shifting away from the plug and and adding explicit tracking in controllers in other places as well.
@begedin you're misunderstanding the problem that led to this. Please read https://github.com/code-corps/code-corps-api/pull/1307#issuecomment-353224704
@joshsmith I assumed, incorrectly, that it would be possible to define a funnel which does not revolve around the user_id
, using custom events, so that's where my confusion comes from.
From what I can tell after looking into it more deeply, that isn't possible, so I guess this is our only option.
Since, with #1351 we also have membership invites to projects, I guess we'll have to do something similar there. I'll add a comment to that PR about how I think we should do it.
Did you get a change to review changes? Is there anything else I should improve before merge?
@iref sorry for the delay on this. We had some things to tace care of before merging this one. It looks good to go to me 👍
No problem. I just wanted update to make sure that I didn't forget anything. :)
What's in this PR?
Segment plug tracker now also tracks events for project ids if id is extractable from request resource. There is more work to be done. Mostly to add
acceptor
property inApproved Project Membership
event. This change might require passing of optional current user toSegmentTraitBuilder.build
References
Closes #1285 Progress on: #927