Stockholders' Equity - Summary of Total Stock-based Compensation Expense (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2021 |
Dec. 31, 2020 |
Dec. 31, 2019 |
|
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | $ 1,092,135 | $ 770,182 | $ 686,013 |
| Cost of Revenue | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 17,221 | 9,367 | 6,365 |
| Research and Development | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 740,130 | 533,272 | 464,639 |
| Sales and Marketing | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | 164,241 | 108,270 | 93,355 |
| General and Administrative | |||
| Share Based Compensation Arrangement By Share Based Payment Award [Line Items] | |||
| Total | $ 170,543 | $ 119,273 | $ 121,654 |