Stockholders' Equity - Summary of Total Stock-based Compensation Expense (Details) - USD ($) $ in Thousands |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Jun. 30, 2019 |
Jun. 30, 2018 |
Jun. 30, 2019 |
Jun. 30, 2018 |
|
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | $ 195,574 | $ 156,371 | $ 358,130 | $ 289,630 |
| Cost of Revenue | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | 1,786 | 1,467 | 3,635 | 1,743 |
| Research and Development | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | 132,610 | 92,303 | 244,852 | 170,118 |
| Sales and Marketing | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | 26,474 | 21,996 | 44,234 | 38,182 |
| General and Administrative | ||||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | ||||
| Total | $ 34,704 | $ 40,605 | $ 65,409 | $ 79,587 |