Stockholders' Equity - Summary of Total Stock-based Compensation Expense (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2019 |
Dec. 31, 2018 |
Dec. 31, 2017 |
|
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | $ 686,013 | $ 538,211 | $ 2,639,895 |
| Cost of Revenue | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 6,365 | 4,393 | 26,071 |
| Research and Development | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 464,639 | 340,533 | 1,154,430 |
| Sales and Marketing | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 93,355 | 84,059 | 236,474 |
| General and Administrative | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | $ 121,654 | $ 109,226 | $ 1,222,920 |