Stock-Based Compensation - Option activity (Details) - Stock options. - USD ($) $ / shares in Units, $ in Thousands |
12 Months Ended |
Dec. 31, 2019 |
Dec. 31, 2018 |
| Number of shares |
|
|
| Outstanding at beginning of period |
14,784,770
|
|
| Options granted |
3,059,004
|
|
| Exercised |
(1,449,309)
|
|
| Forfeited |
(1,290,558)
|
|
| Outstanding at end of period |
15,103,907
|
14,784,770
|
| Vested and expected to vest as of December 31, 2019 |
15,103,907
|
|
| Options exercisable as of December 31, 2019 |
5,182,808
|
|
| Weighted average exercise price |
|
|
| Outstanding at the beginning (in dollars per share) |
$ 8.93
|
|
| Granted (in dollars per share) |
12.67
|
|
| Exercised (in dollars per share) |
1.68
|
|
| Forfeited (in dollars per share) |
8.58
|
|
| Outstanding at the end (in dollars per share) |
10.41
|
$ 8.93
|
| Vested and expected to vest (in dollars per share) |
10.41
|
|
| Options exercisable (in dollars per share |
$ 6.33
|
|
| Weighted average contractual term and aggregate intrinsic value |
|
|
| Outstanding at the beginning (in years) |
8 years 2 months 19 days
|
8 years 10 months 21 days
|
| Outstanding at the end (in years) |
8 years 2 months 19 days
|
8 years 10 months 21 days
|
| Vested and expected to vest (in years) |
8 years 2 months 19 days
|
|
| Options exercisable (in years) |
7 years 5 months 27 days
|
|
| Outstanding at the beginning (in dollars) |
$ 126,367
|
|
| Outstanding at the end (in dollars) |
36,006
|
$ 126,367
|
| Vested and expected to vest (in dollars) |
36,006
|
|
| Options exercisable (in dollars) |
$ 21,743
|
|