Fair Value Measurements | 4. Fair Value Measurements We utilize valuation techniques that maximize the use of observable inputs and minimize the use of unobservable inputs to the extent possible. We determine fair value based on assumptions that market participants would use in pricing an asset or liability in the principal or most advantageous market. When considering market participant assumptions in fair value measurements, the following fair value hierarchy distinguishes between observable and unobservable inputs, which are categorized in one of the following levels: Level 1 Unadjusted quoted prices in active markets for identical assets or liabilities at the measurement date. Level 2 Inputs other than Level 1 that are observable, either directly or indirectly, such as quoted prices for similar assets or liabilities; quoted prices in markets that are not active near the measurement date; or other inputs that are observable or can be corroborated by observable market data for substantially the full term of the assets or liabilities. Level 3 Unobservable inputs that are supported by little or no market activity and that are significant to the fair value of the assets or liabilities. The fair value of our money market funds was determined based on “Level 1” inputs. The fair value of commercial paper, certificates of deposit, U.S. Treasury and agency bonds, and corporate bonds were determined based on “Level 2” inputs. The valuation techniques used to measure the fair value of commercial paper and certificates of deposit included observable market-based inputs for similar assets, which primarily include yield curves and time-to-maturity two-sided There were no marketable securities measured on a recurring basis in the “Level 3” category. We have not elected the fair value option as prescribed by ASC 825, The Fair Value Option for Financial Assets and Financial Liabilities Instruments Measured at Fair Value on a Recurring Basis. As of March 31, 2018 Cost Gross Fair Value Cash and Short-term Long-term Cash $ 37,302 $ — $ 37,302 $ 37,302 $ — $ — Level 1: Money market funds 11,082 — 11,082 11,082 — — Subtotal 11,082 — 11,082 11,082 — — Level 2: Commercial paper 3,495 — 3,495 2,749 746 — Certificates of deposit 4,052 — 4,052 — 1,500 2,552 U.S. Treasury and agency bonds 103,537 (266 ) 103,271 7,944 76,425 18,902 Corporate bonds 46,668 (127 ) 46,541 — 41,139 5,402 Subtotal 157,752 (393 ) 157,359 10,693 119,810 26,856 Level 3 — — — — — — Total $ 206,136 $ (393 ) $ 205,743 $ 59,077 $ 119,810 $ 26,856 As of December 31, 2017 Cost Gross Fair Value Cash and Short-term Long-term Cash $ 100,651 $ — $ 100,651 $ 100,651 $ — $ — Level 1: Money market funds 19,065 — 19,065 19,065 — — Subtotal 19,065 — 19,065 19,065 — — Level 2: U.S. Treasury and agency bonds 44,968 (176 ) 44,792 — 25,923 18,869 Corporate bonds 29,608 (50 ) 29,558 — 28,463 1,095 Subtotal 74,576 (226 ) 74,350 — 54,386 19,964 Level 3 — — — — — — Total $ 194,292 $ (226 ) $ 194,066 $ 119,716 $ 54,386 $ 19,964 There were no transfers between Level 1, Level 2, or Level 3 securities during the three months ended March 31, 2018. As of March 31, 2018, there were 64 securities with a fair value of $139.6 million in an unrealized loss position for less than 12 months. The gross unrealized losses of $0.4 million as of March 31, 2018 were due to changes in market rates, and we have determined the losses are temporary in nature. All the long-term investments had maturities of between one and two years in duration as of March 31, 2018. Cash and cash equivalents, restricted cash, and investments as of March 31, 2018 and December 31, 2017 held domestically were approximately $198.1 million and $181.3 million, respectively. Contingent Consideration. earn-out The following table presents a reconciliation of the beginning and ending balances of acquisition-related accrued contingent consideration using significant unobservable inputs (Level 3) for the three months ended March 31, 2018 and 2017 (in thousands): Three Months Ended March 31, 2018 2017 Beginning balance $ 975 $ — Obligations assumed 1,200 1,160 Change in fair value 293 — Settlement (656 ) — Ending balance $ 1,812 $ 1,160 Upon the achievement of certain milestones in connection with our acquisition of Semanta, we released 18,869 shares of Class A common stock to the former shareholders of Semanta in the three months ended March 31, 2018. In addition, 5,381 shares were earned, but held back for customary indemnification matters in accordance with the acquisition agreement, and the value of the shares is presented within additional paid-in Instruments Not Recorded at Fair Value on a Recurring Basis. Assets and Liabilities Recorded at Fair Value on a Non-Recurring non-recurring |