Stockholders' Equity - Summary of Total Stock-based Compensation Expense (Details) - USD ($) $ in Thousands |
3 Months Ended | 9 Months Ended | ||
|---|---|---|---|---|
Sep. 30, 2019 |
Sep. 30, 2018 |
Sep. 30, 2019 |
Sep. 30, 2018 |
|
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | $ 161,228 | $ 126,809 | $ 519,358 | $ 416,439 |
| Cost of Revenue | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | 1,332 | 1,368 | 4,967 | 3,111 |
| Research and Development | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | 108,176 | 95,329 | 353,028 | 265,447 |
| Sales and Marketing | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | 23,333 | 25,082 | 67,567 | 63,264 |
| General and Administrative | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | $ 28,387 | $ 5,030 | $ 93,796 | $ 84,617 |