• nicolasdular's avatar
    Add paid signup tracking events · 39fd54b8
    nicolasdular authored
    This adds the required tracking for the new paid signup flow.
    We're using frontend tracking as well because it gives us a user
    session. For users who have not activated frontend tracking, we
    can fallback to backend tracking.
    
    Two things to be aware of:
    
    1. Users who go to /-/subscriptions/new who are not signed in, get
    redirected to /users/sign_up. After they successfully created an
    account or signed in, we redirect them to /-/subscriptions/new again.
    However, when they go to -/subscriptions/new, we would track the
    experiment_start event a second time. Therefore, we added the param
    experiment_started to not call track them twice
    
    2. For the sign_up_view event, we only want to track users who got
    redirected from /-/subscriptions/new, therefore we have added the
    redirected_from=checkout param.
    39fd54b8
subscriptions_controller.rb 3.77 KB