Stockholders' Equity - Summary of Total Stock-based Compensation Expense (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2018 |
Dec. 31, 2017 |
Dec. 31, 2016 |
|
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | $ 538,211 | $ 2,639,895 | $ 31,842 |
| Cost of Revenue | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 4,393 | 26,071 | 532 |
| Research and Development | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 340,533 | 1,154,430 | 21,935 |
| Sales and Marketing | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 84,059 | 236,474 | 3,956 |
| General and Administrative | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | $ 109,226 | $ 1,222,920 | $ 5,419 |