Shareholders' Equity - Classification of Stock-based Compensation (Details) - USD ($) $ in Thousands |
12 Months Ended | |
|---|---|---|
Dec. 31, 2017 |
Dec. 31, 2016 |
|
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | $ 49,163 | $ 23,098 |
| Cost of revenues | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | 1,102 | 629 |
| Sales and marketing | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | 8,986 | 3,951 |
| Research and development | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | 31,338 | 14,318 |
| General and administrative | ||
| Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items] | ||
| Stock-based compensation expense | $ 7,737 | $ 4,200 |