Organization and Summary of Significant Accounting Policies | Organization and Summary of Significant Accounting Policies Basis of Consolidation The accompanying consolidated financial statements have been prepared in accordance with accounting principles generally accepted in the United States of America, or GAAP, and include the operations of the Company and its wholly owned subsidiaries. All significant intercompany transactions and balances have been eliminated in consolidation. Segments Management has determined that the Company operates as one segment. The Company’s chief operating decision maker reviews financial information on an aggregated and consolidated basis, together with certain operating and performance measures principally to make decisions about how to allocate resources and to measure the Company’s performance. Use of Estimates The preparation of consolidated financial statements in conformity with GAAP requires management to make estimates and assumptions that affect the reported and disclosed financial statements and accompanying footnotes. Actual results could differ materially from these estimates. On an ongoing basis, management evaluates its estimates, primarily those related to: (i) revenue recognition criteria, including the determination of revenue reporting as net versus gross in the Company’s revenue arrangements, (ii) accounts receivable and allowances for doubtful accounts, (iii) amounts capitalized and the useful lives of intangible assets, internal use software development costs, and property and equipment, (iv) valuation of long-lived assets and their recoverability, including goodwill, and (v) the realization of tax assets and estimates of tax liabilities. These estimates are based on historical data and experience, as well as various other factors that management believes to be reasonable under the circumstances, the results of which form the basis for making judgments about the carrying value of assets and liabilities that are not readily apparent from other sources. Estimates relating to the allowance for doubtful accounts, amounts capitalized and estimated useful lives of internal-use software development costs, estimated useful lives of long-lived assets, recoverability of intangible assets and goodwill, and income taxes, including the realization of tax assets and estimates of tax liabilities require the selection of appropriate valuation methodologies and models, and judgment in evaluating ranges of assumptions and financial inputs. Actual results may differ materially from those estimates under different assumptions or circumstances. Revenue Recognition The Company generates revenue from transactions where it provides a platform for the purchase and sale of digital advertising inventory. Generally, the Company's revenue is based on a percentage of the ad spend that runs through its platform, although for certain clients, services, or transaction types the Company may receive a fixed CPM for each impression sold, and for advertising campaigns that are transacted through insertion orders the Company earns revenue based on the full amount of ad spend that runs through its platform. In addition, the Company may receive certain fixed monthly fees for the use of its platform or products. The Company's platform dynamically connects sellers and buyers of advertising inventory in a digital marketplace. The Company's solution incorporates proprietary machine-learning algorithms, sophisticated data processing, high-volume storage, detailed analytics capabilities, and a distributed infrastructure. Digital advertising inventory is created when consumers access sellers’ content. Sellers provide digital advertising inventory to the Company's platform in the form of advertising requests, or ad requests. When the Company receives ad requests from sellers, it sends bid requests to buyers, which enable buyers to bid on sellers’ digital advertising inventory. Winning bids can create advertising, or paid impressions, for the seller to present to the consumer. The total volume of spending between buyers and sellers on the Company's platform is referred to as advertising spend. The Company keeps a percentage of that advertising spend as a fee, and remits the remainder to the seller. The fee that the Company retains from the gross advertising spend on its platform is recognized as revenue. The fee earned on each transaction is based on the pre-existing agreement between the Company and the seller and the clearing price of the winning bid. The Company recognizes revenue upon fulfillment of its performance obligation to a client, which occurs at the point in time an ad renders and is counted as a paid impression, subject to a contract existing with the client and a fixed or determinable transaction price. The Company does not have arrangements with multiple performance obligations. The Company does not disclose the value of unsatisfied performance obligations for (i) contracts with an original expected length of one year or less and (ii) contracts for which the Company recognizes revenue at the amount to which it has the right to invoice for services performed. The Company considers the following when determining if a contract exists (i) contract approval by all parties, (ii) identification of each party’s rights regarding the goods or services to be transferred, (iii) specified payment terms, (iv) commercial substance of the contract, and (v) collectability of substantially all of the consideration is probable. The determination of whether revenue should be reported on a gross or net basis is based on an assessment of whether the Company is acting as the principal or an agent in the transaction. In determining whether the Company is acting as the principal or an agent, the Company follows the accounting guidance for principal-agent considerations. Making such determinations involves judgment and is based on an evaluation of the terms of each arrangement, none of which are considered presumptive or determinative. Expenses The Company classifies its expenses into the following categories: Cost of Revenue. The Company's cost of revenue consists primarily of cloud hosting, data center, and bandwidth costs, ad protection costs, depreciation and maintenance expense of hardware supporting the Company's revenue-producing platform, amortization of software costs for the development of the Company's revenue-producing platform, amortization expense associated with acquired developed technologies, and personnel costs. In addition, for revenue booked on a gross basis, cost of revenue includes traffic acquisition costs. Personnel costs included in cost of revenue include salaries, bonuses, and stock-based compensation, and are primarily attributable to personnel in the Company's network operations group who support the Company's platform. The Company capitalizes costs associated with software that is developed or obtained for internal use and amortizes the costs associated with its revenue-producing platform in cost of revenue over their estimated useful lives. The Company amortizes acquired developed technologies over their estimated useful lives. Sales and Marketing. The Company's sales and marketing expenses consist primarily of personnel costs, including salaries, bonuses, and stock-based compensation, as well as marketing expenses such as brand marketing, travel expenses, trade shows and marketing materials, amortization expense associated with client relationships, backlog, and non-compete agreements from the Company's business acquisitions, professional services, facilities-related costs, and depreciation expense. The Company's sales and support organization focuses on increasing the adoption of the Company's solution by existing and new buyers and sellers and supports ongoing client relationships. The Company amortizes acquired intangibles associated with client relationships and backlog from its business acquisitions over their estimated useful lives. Technology and Development. The Company's technology and development expenses consist primarily of personnel costs, including salaries, bonuses, and stock-based compensation, as well as professional services associated with the ongoing development and maintenance of the Company's solution, third-party software license costs, facilities-related costs, and depreciation and amortization expense. These expenses include costs incurred in the development, implementation, and maintenance of internal use software, including platform and related infrastructure. Technology and development costs are expensed as incurred, except to the extent that such costs are associated with internal use software development that qualifies for capitalization, which are then recorded as internal use software development costs, net on the Company's consolidated balance sheets. The Company amortizes internal use software development costs that relate to its revenue-producing activities on the Company's platform to cost of revenue and amortize other internal use software development costs to technology and development costs or general and administrative expenses, depending on the nature of the related project. The Company amortizes acquired intangibles associated with technology and development functions from its business acquisitions over their estimated useful lives. General and Administrative. The Company's general and administrative expenses consist primarily of personnel costs, including salaries, bonuses, and stock-based compensation, associated with the Company's executive, finance, legal, human resources, compliance, and other administrative personnel, as well as accounting and legal professional services fees, facilities-related costs, depreciation expense, bad debt expense, and other corporate-related expenses. Merger, Acquisition, and Restructuring Costs. The Company's merger, acquisition, and restructuring costs consist primarily of professional service fees associated with merger and acquisition activities, cash-based employee termination costs, related stock-based compensation charges, and other restructuring activities, including facility closures, relocation costs, contract termination costs, and impairment costs of abandoned technology associated with restructuring activities. Stock-Based Compensation Compensation expense related to employee and non-employee stock-based awards is measured and recognized in the consolidated financial statements based on the fair value of the awards granted. The Company grants awards to employees that vest based solely on continued service, or service conditions, awards that vest based on the achievement of performance targets, or performance conditions, and awards that vest based on the Company's stock price exceeding a peer index, or market conditions. The fair value of restricted stock units that vest based on continued service is equal to the closing price of the Company's common stock as reported on the Nasdaq on the grant date. The fair value of each option award containing service conditions is estimated on the grant date using the Black-Scholes option-pricing model. The fair value of awards containing market conditions is estimated using a Monte-Carlo simulation model. For service condition awards, stock-based compensation expense is recognized on a straight-line basis over the requisite service periods of the awards, which is generally four years. For performance condition and market condition awards, stock-based compensation expense is recognized using a graded vesting model over the requisite service period of the awards. For market condition awards, expense recognized is not subsequently reversed if the market conditions are not achieved. The assumptions and estimates used in the Black-Scholes pricing model are as follows: Fair Value of Common Stock. The fair value of common stock is based on the closing price of the Company's common stock as reported on the Nasdaq on the grant date. Risk-Free Interest Rate. The Company bases the risk-free interest rate used in the Black-Scholes option-pricing model on the yields of U.S. Treasury securities with maturities appropriate for the term of stock option awards. Expected Term. For employee stock options the expected term is determined based on historical trends. The expected term of employee stock options that contain performance conditions represents the weighted-average period that the stock options are estimated to remain outstanding. Volatility. The computation of the expected volatility assumption is based on the historical volatility of the Company’s common stock. Dividend Yield. The dividend yield assumption is based on the Company’s history and current expectations of dividend payouts. The Company has never declared or paid any cash dividends on its common stock and does not anticipate paying any cash dividends in the foreseeable future, so the Company used an expected dividend yield of zero. Determining the fair value of stock-based awards with performance and market conditions requires judgment. The Company's use of the Monte-Carlo simulation model requires the input of subjective assumptions, such as the expected term of the award, the expected volatility of the price of the Company’s common stock, risk-free interest rates, the expected dividend yield of the Company’s common stock, in addition for those awards containing market conditions, which also include expected volatilities of selected peer companies, and expected correlation coefficients of the Company and those of the selected peer companies. The assumptions used in the Company’s valuation model represent management’s best estimates. These estimates involve inherent uncertainties and the application of management’s judgment. If factors change and different assumptions are used, the Company’s stock-based compensation expense could be materially different in the future. Income Taxes Deferred income tax assets and liabilities are determined based upon the net tax effects of the differences between the Company’s consolidated financial statement carrying amounts and the tax basis of assets and liabilities and are measured using the enacted tax rate expected to apply to taxable income in the years in which the differences are expected to be reversed. A valuation allowance is used to reduce some or all of the deferred tax assets if, based upon the weight of available evidence, it is more likely than not that those deferred tax assets will not be realized. The Company maintains a partial valuation allowance to offset its domestic net deferred tax assets due to the uncertainty of realizing future income tax benefits from the net operating loss carryforwards and other deferred tax assets. The Company recognizes the income tax benefit from an uncertain tax position only if it is more likely than not that the tax position will be sustained on examination by the taxing authorities, based on the technical merits of the position. The income tax benefits recognized in the consolidated financial statements from such positions are then measured based on the largest benefit that has a greater than 50% likelihood of being realized. The Company recognizes interest and penalties accrued related to its uncertain tax positions in its income tax provision (benefit) in the consolidated statements of operations. Capital Stock The Company has authorized capital stock of 500,000,000 shares of common stock and 10,000,000 shares of preferred stock. The Company has issued common stock, which is included in outstanding common stock on the Company's consolidated balance sheets. During 2021 and 2022, the Company repurchased shares of common stock, which was recorded as treasury stock on the Company's consolidated balance sheets. In 2022, all repurchased shares, including any outstanding treasury stock from 2021, were subsequently retired. The Company has not issued any shares of its preferred stock subsequent to the Company's initial public offering ("IPO") and does not have any preferred stock outstanding. The Company is required to reserve and keep available out of its authorized but unissued shares of common stock such number of shares sufficient to affect the conversion of all shares granted and available for grant under the Company’s stock award plans. The number of shares of the Company's stock reserved for these purposes at December 31, 2023 was 44,592,265. The board of directors is authorized to establish, from time to time, the number of shares to be included in each series of preferred stock, and to fix the designation, powers, privileges, preferences, and relative participating, optional or other rights, if any, of the shares of each series of preferred stock, and any of its qualifications, limitations or restrictions. Net Income (Loss) Per Share Attributable to Common Stockholders Basic net income (loss) per share of common stock is calculated by dividing the net income (loss) by the weighted-average number of shares of common stock outstanding. Diluted income per share considers adjustments to net income and the weighted-average number of shares of common stock outstanding for the effect of potentially dilutive securities during the period. Potentially dilutive securities consist of stock options, restricted stock units, performance stock units, potential shares issuable under the Company's Employee Stock Purchase Plan ("ESPP"), and potential shares issuable as part of the Convertible Senior Notes. Diluted income per share is computed utilizing the treasury method for options, restricted stock units, performance stock units, and potential ESPP shares. Diluted income per share for the Convertible Senior Notes is calculated under the if-converted method. Potential common share equivalents are excluded where their inclusion would be anti-dilutive. For periods in which the Company reports net loss, diluted net loss per share is the same as basic net loss per share because the effects of potentially dilutive securities would be anti-dilutive. Comprehensive Income (Loss) Comprehensive income (loss) encompasses all changes in equity other than those arising from transactions with stockholders, and consists of net income (loss), unrealized gains (losses) on investments and foreign currency translation adjustments. Cash and Cash Equivalents The Company invests excess cash primarily in money market funds, corporate debt securities, and highly liquid debt instruments of the U.S. government and its agencies. The Company classifies investments held in money market funds as cash equivalents because the money market funds have weighted-average maturities at the date of purchase of less than 90 days, are freely redeemable into cash and have a constant net asset value. Investments held in U.S. government and agency bonds and corporate debt securities with stated maturities of less than one year are classified as short-term investments. Restricted Cash The Company classifies certain restricted cash balances within prepaid expenses and other current assets and other assets, non-current on the consolidated balance sheets based upon the term of the remaining restrictions. Accounts Receivable Allowance for Doubtful Accounts Accounts receivable are recorded at the invoiced amount, are unsecured, and do not bear interest. The allowance for doubtful accounts is based on the best estimate of the amount of probable credit losses in existing accounts receivable. The allowance for doubtful accounts is determined based on historical collection experience and the review in each period of the status of the then-outstanding accounts receivable, while taking into consideration current client information, subsequent collection history and other relevant data. The Company reviews the allowance for doubtful accounts on a quarterly basis. Account balances are charged off against the allowance when the Company believes it is probable the receivable will not be recovered. Property and Equipment, Net Property and equipment are recorded at historical cost, less accumulated depreciation and amortization. Depreciation is computed using the straight-line method based upon the estimated useful lives of the assets. The estimated useful lives of the Company’s property and equipment are as follows: Years Computer equipment and network hardware 3 Furniture, fixtures and office equipment 5 to 7 Leasehold improvements Shorter of useful life or life of lease Repair and maintenance costs are charged to expense as incurred, while renewals and improvements are capitalized. When assets are retired or otherwise disposed of, the cost and related accumulated depreciation are removed from the accounts and any resulting gain or loss is reflected in the Company’s results of operations. Internal Use Software Development Costs The Company capitalizes certain internal use software development costs associated with creating and enhancing internally developed software related to the Company’s technology infrastructure. These costs include personnel and related employee benefits expenses for employees who are directly associated with and who devote time to software projects, and external direct costs of materials and services consumed in developing or obtaining the software. Software development costs that do not meet the qualification for capitalization, as further discussed below, are expensed as incurred and recorded in technology and development expenses in the results of operations. Software development activities generally consist of three stages, (i) the planning stage, (ii) the application and infrastructure development stage, and (iii) the post implementation stage. Costs incurred in the planning and post implementation stages of software development, including costs associated with the post-configuration training and repairs and maintenance of the developed technologies, are expensed as incurred. The Company capitalizes costs associated with software developed for internal use when the planning stage is completed, management has authorized further funding for the completion of the project, and it is probable that the project will be completed and perform as intended. Costs incurred in the application and infrastructure development stages, including significant enhancements and upgrades, are capitalized. Capitalization ends once a project is substantially complete and the software and technologies are ready for their intended purpose. Internal use software development costs are amortized using a straight-line method over the estimated useful life, which is generally three years, commencing when the software is ready for its intended use. The straight-line recognition method approximates the manner in which the expected benefit will be derived. On an ongoing basis, the Company assesses the remaining estimated useful lives of internal use software projects. If remaining useful lives are revised, the change is accounted for as a change in estimate. The Company does not transfer ownership of its software, or lease its software, to third parties. Intangible Assets Intangible assets primarily consist of acquired developed technology, client relationships, and in-process research and development projects resulting from business combinations, which are recorded at acquisition-date fair value, less accumulated amortization. The Company determines the appropriate useful life of its intangible assets by performing an analysis of expected cash flows of the acquired assets. Intangible assets are amortized over their estimated useful lives using a straight-line method, which approximates the pattern in which the economic benefits are consumed. The Company’s intangible assets are being amortized over their estimated useful lives as follows: Years Developed technology 5 In-process research and development 3 to 5 Customer relationships 0.5 to 4 Backlog 0.75 Non-compete agreements 1 to 2 Other intangible assets 0.25 to 1.5 On an ongoing basis, the Company assesses the remaining estimated useful lives of intangible assets. If remaining useful lives are revised, the change is accounted for as a change in estimate. Intangible assets are reviewed for impairment indicators at least annually and whenever events or changes in circumstances indicate that the carrying amount of the assets might not be recoverable. Conditions that would necessitate an impairment assessment include a significant decline in the observable market value of an asset, a significant change in the extent or manner in which an asset is used, or any other significant adverse change that would indicate that the carrying amount of an asset or group of assets may not be recoverable. For intangible assets used in operations, impairment losses are only recorded if the asset’s carrying amount is not recoverable through its undiscounted, probability-weighted future cash flows at the asset group level that represents the lowest level of independent cash flows. The Company measures the impairment loss based on the difference between the carrying amount and estimated fair value. Impairment of Long-Lived Assets including Internal Use Capitalized Software Costs The Company assesses the recoverability of its long-lived assets when events or changes in circumstances indicate their carrying value may not be recoverable. Such events or changes in circumstances may include: a significant adverse change in the extent or manner in which a long-lived asset is being used, significant adverse change in legal factors or in the business climate that could affect the value of a long-lived asset, an accumulation of costs significantly in excess of the amount originally expected for the acquisition or development of a long-lived asset, current or future operating or cash flow losses that demonstrate continuing losses associated with the use of a long-lived asset, or a current expectation that, more likely than not, a long-lived asset will be sold or otherwise disposed of significantly before the end of its previously estimated useful life. The Company performs impairment testing at the asset group level that represents the lowest level for which identifiable cash flows are largely independent of the cash flows of other assets and liabilities. The Company assesses recoverability of a long-lived asset by determining whether the carrying value of the asset group can be recovered through projected undiscounted cash flows over their remaining lives. If the carrying value of the asset group exceeds the forecasted undiscounted cash flows, an impairment loss is recognized, measured as the amount by which the carrying amount exceeds estimated fair value. An impairment loss is charged to operations in the period in which management determines such impairment. Business Combinations The results of businesses acquired in a business combination are included in the Company’s consolidated financial statements from the date of acquisition. The Company allocates the purchase price of a business combination, which is the sum of the consideration provided, which may consist of cash, equity or a combination of the two, to the identifiable assets and liabilities of the acquired business at their acquisition date fair values. The excess of the purchase price over the amount allocated to the identifiable assets and liabilities, if any, is recorded as goodwill. Determining the fair value of assets acquired and liabilities assumed requires management to use significant judgment and estimates including the selection of valuation methodologies, estimates of future revenues and cash flows, discount rates and selection of comparable companies. When the Company issues stock-based or cash awards to an acquired company’s stockholders, the Company evaluates whether the awards are contingent consideration or compensation for post-business combination services. The evaluation includes, among other things, whether the vesting of the awards is contingent on the continued employment of the selling stockholder beyond the acquisition date. If continued employment is required for vesting, the awards are treated as compensation for post-acquisition services and recognized as expense over the requisite service period. The Company estimates the fair value of intangible assets acquired generally using a discounted cash flow approach, which includes an analysis of the future cash flows expected to be generated by the asset and the risk associated with achieving these cash flows. The key assumptions used in the discounted cash flow model include the discount rate that is applied to the forecasted future cash flows to calculate the present value of those cash flows and the estimate of future cash flows attributable to the acquired intangible asset, which include revenue, expenses and taxes. The carrying value of acquired working capital assets and liabilities approximates its fair value, given the short-term nature of these assets and liabilities. Acquisition-related transaction costs are not included as a component of consideration transferred, but are accounted for as an expense in the period in which the costs are incurred. Goodwill Goodwill represents the excess of the aggregate fair value of the consideration transferred in a business combination over the fair value of the assets acquired, net of liabilities assumed. Goodwill is not amortized, but is subject to impairment testing conducted annually during the fourth quarter or more frequently if events or changes in circumstances indicate that goodwill may be impaired. In accordance with guidance related to impairment testing, the Company has the option to first assess qualitative factors to determine whether or not it is necessary to perform the quantitative goodwill impairment test. If the qualitative assessment option is not elected, or if the qualitative assessment indicates that it is more likely than not that the fair value is less than its carrying amount, a quantitative analysis is then performed. The quantitative analysis, if performed, compares the estimated fair value of the Company with its respective carrying amount, including goodwill. If the estimated fair value of the Company exceeds its carrying amount, including goodwill, goodwill is considered not to be impaired and no additional steps are necessary. If the fair value is less than the carrying amount, including goodwill, then an impairment adjustment must be recorded up to the carrying amount of goodwill. The Company operates as a single operating segment and has identified a single reporting unit. Operating Leases The Company determines if an arrangement is a lease at inception. A contract is or contains a lease if it conveys the right to control the use of an identified asset for a period of time in exchange for consideration. The Company's classes of assets that are leased include office facilities, data centers, and equipment. The Company has elected not to recognize short-term leases on the balance sheet, nor separate lease and non-lease components for data center leases. In addition, the Company utilized the portfolio approach to group leases with similar characteristics together. For identified leases, the Company used its incremental borrowing rate to discount the related future payment obligations, which represents the rate of interest the Company would have to pay to borrow on a collateralized basis over a similar term an amount equal to the lease payments in a similar economic environment. The Company records rent expense for operating leases, including leases of office locations, data centers, and equipment, on a straight-line basis over the lease term. The straight-line calculation of rent expense includes rent escalations on certain leases, as well as lease incentives provided by the landlords, including payments for leasehold improvements and rent-free periods. The Company begins recognition of rent expense on the commencement date, which is generally the date that the asset is made available for use. Lease liability, which represents the present value of the Company's obligation related to the estimated future lease payments, is included in lease liabilities, current and lease liabilities, non-current within the consolidated balance sheets. These liability balances are reduced as lease related payments are made. For operating leases, the right of use ("ROU") asset is amortized on a periodic basis over the expected term of the lease (see Note 15). Fair Value of Financial Instruments The carrying amounts of the Company's cash equivalents, accounts receivable, accounts payable, accrued expenses, and seller payables approximate fair value due to the short-term nature of these instruments. Certain assets of the Company are recorded at their fair value, using the |