Shareholders' Equity - Classification of Stock-based Compensation (Details) - USD ($) $ in Thousands |
12 Months Ended | |
|---|---|---|
Dec. 31, 2018 |
Dec. 31, 2017 |
|
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | $ 95,720 | $ 49,163 |
| Cost of revenues | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | 2,232 | 1,102 |
| Sales and marketing | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | 21,928 | 8,986 |
| Research and development | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | 55,164 | 31,338 |
| General and administrative | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | $ 16,396 | $ 7,737 |