Equity Incentive Plans and Stock-Based Compensation | Equity Incentive Plans and Stock-Based Compensation Equity Incentive Plans 2014 Equity Incentive Plan The 2014 Equity Incentive Plan (the “2014 Plan”) provides for the granting of stock options, restricted stock awards, restricted stock units (“RSUs”), performance-based RSUs (“PSUs”), stock appreciation rights, performance units and performance shares to our employees, consultants and members of our board of directors. In June 2015, our board of directors adopted and our stockholders approved an amendment and restatement of the 2014 Plan, which increased the number of shares available for issuance under the 2014 Plan by the number of shares granted under the 2008 Stock Plan (the “2008 Plan”) that were or may in the future be canceled or otherwise forfeited or repurchased after March 20, 2014. A maximum of 8,310,566 shares may become available from such awards granted under the 2008 Plan for issuance under the 2014 Plan. As of December 31, 2016 , we had 4,241,980 shares available for future grant. Annually, the shares authorized for the 2014 Plan increase by the least of (i) 8,000,000 shares, (ii) 5% of the outstanding shares of common stock on the last day of our immediately preceding fiscal year, or (iii) such other amount as determined by our Board of Directors. On January 1, 2017 , the number of shares in the 2014 Plan increased by 3,394,376 shares, representing 5% of the prior year end’s common stock outstanding. In addition, 266,799 shares granted under the 2008 Plan that had been canceled, forfeited or repurchased during the year ended December 31, 2016 became available for issuance under the 2014 Plan. As of June 30, 2017 , we had 5,927,133 shares available for future grant plus an additional 81,188 shares granted under the 2008 Plan that have been canceled, forfeited or repurchased during the six months ended June 30, 2017 . 2014 Employee Stock Purchase Plan The 2014 Employee Stock Purchase Plan (the "2014 Purchase Plan") provides for twenty-four month offering periods with four six-month purchase periods in each offering period. Employees purchase shares in each purchase period at 85% of the market value of our common stock at the beginning of the offering period or the end of the purchase period, whichever is lower. If the market value of our common stock at the end of the purchase period is less than the market value at the beginning of the offering period, participants will be withdrawn from the then current offering period following their purchase of shares, and automatically will be enrolled in the immediately following offering period. Participants may contribute up to 15% of their eligible compensation, subject to certain limits. Employees purchased 524,101 shares at an average price of $6.49 and 552,554 shares at an average price of $3.88 for the six months ended June 30, 2017 and 2016 , respectively. The intrinsic value of shares purchased during the six months ended June 30, 2017 and 2016 was $0.9 million and $1.3 million , respectively. The intrinsic value is calculated as the difference between the market value on the date of purchase and the purchase price of the shares. As of June 30, 2017 , we had 3,579,959 shares available for future issuance under the 2014 Purchase Plan. Stock-Based Compensation A summary of our stock-based compensation expense is as follows (in thousands): Three Months Ended June 30, Six Months Ended June 30, 2017 2016 2017 2016 Stock-based compensation by type of award: Stock options $ 791 $ 1,081 $ 1,610 $ 2,181 Stock awards 3,351 3,423 6,300 6,383 Employee stock purchase plan 821 (635 ) 1,369 (83 ) $ 4,963 $ 3,869 $ 9,279 $ 8,481 Stock-based compensation by category of expense: Cost of revenue $ 382 $ 224 $ 665 $ 589 Sales and marketing 1,888 1,732 3,424 3,817 Research and development 1,823 1,090 3,487 2,521 General and administrative 870 823 1,703 1,554 $ 4,963 $ 3,869 $ 9,279 $ 8,481 As of June 30, 2017 , we had $47.2 million of unrecognized stock-based compensation expense related to unvested stock-based awards which will be recognized over a weighted-average period of 2.6 years. The fair value of the options was estimated as of the grant date using the Black-Scholes option-pricing model with the following assumptions: Three Months Ended June 30, Six Months Ended June 30, 2017 2016 2017 2016 Expected term (in years) 4.7 * 4.7 4.9 Risk-free interest rate 1.74% * 1.74% 1.42% Volatility 42% * 42% 49% Dividend rate —% * —% —% * We did not grant stock options during the three months ended June 30, 2016 . The fair value of the employee stock purchase rights was estimated as of the grant date using the Black-Scholes option-pricing model with the following assumptions: Three and Six Months Ended June 30, 2017 2016 Expected term (in years) 1.3 1.3 Risk-free interest rate 1.12% 0.65% Volatility 38% 43% Dividend rate —% —% Stock Options The following tables summarize our stock option activities and related information: Number of Shares (thousands) Weighted-Average Exercise Price Weighted-Average Remaining Contractual Term Aggregate Intrinsic Value (thousands) Outstanding as of December 31, 2016 7,868 $ 4.82 Granted 135 $ 8.42 Exercised (1,130 ) $ 3.37 Canceled (1) (350 ) $ 6.38 Outstanding as of June 30, 2017 6,523 $ 5.07 5.7 $ 23,134 Vested and exercisable as of June 30, 2017 5,097 $ 4.93 5.1 $ 18,819 (1) Includes 81,188 shares of canceled stock options from the 2008 Plan that became available for issuance under the 2014 Plan. As of June 30, 2017 , the aggregate intrinsic value represents the excess of the closing price of our common stock of $8.44 over the exercise price of the outstanding in-the-money options. The following table provides information pertaining to our stock options (in thousands, except weighted-average fair value): Six Months Ended June 30, 2017 2016 Fair value of options granted $ 426 $ 1,603 Weighted-average fair value of options granted $ 3.15 $ 2.38 Intrinsic value of options exercised $ 6,429 $ 832 Stock Awards We have granted RSUs to our employees, consultants and members of our board of directors, and PSUs and market performance-based restricted stock units (“MSUs”) to certain executives. In 2014 and 2015, we granted 540,000 MSUs and 40,000 MSUs, respectively, to certain executives. These MSUs will vest if the closing price of our common stock remains above certain predetermined target prices for 20 consecutive trading days within a 4 -year period following the grant date, subject to continued service by the award holder. None of these MSUs were vested as of June 30, 2017 . In February 2016, we granted 547,000 PSUs with certain financial and operational targets. Actual performance resulted in participants achieving 80% of target, or approximately 414,000 shares, which will vest in annual tranches through February 2020 subject to continued service vesting requirements. In October 2016, we granted 60,641 PSUs with certain financial and operational targets. To the extent they become eligible to vest upon achievement of the performance targets, these PSUs additionally are subject to service condition vesting requirements with scheduled vesting dates of March 2017 through June 2018. As of June 30, 2017 , 12,128 shares had vested, 12,128 shares were forfeited, and the remaining shares were unvested and are eligible to vest based on achievement of performance targets. In March 2017, we granted 395,383 PSUs with certain financial targets. These PSUs will vest between ranges of 0% and 150% based on the actual performance, and are subject to service condition vesting requirements with 25% of the PSUs that become eligible to vest upon achievement of the performance targets scheduled to vest on each of the first, second, third and fourth year anniversaries following February 2017. None of these PSUs were vested as of June 30, 2017 . The following table summarizes our stock award activities and related information: Number of Shares (thousands) Weighted-Average Grant Date Fair Value Weighted-Average Remaining Vesting Term Aggregate Intrinsic Value (thousands) Outstanding as of December 31, 2016 5,959 $ 5.81 Granted 2,732 $ 8.73 Released (1,133 ) $ 6.13 Canceled (623 ) $ 5.64 Outstanding as of June 30, 2017 6,935 $ 6.92 1.8 $ 58,533 The aggregate intrinsic value of outstanding awards is calculated based on the closing price of our common stock of $8.44 on June 30, 2017 . The aggregate fair value of stock awards released as of the respective vesting dates was approximately $10.2 million and $1.8 million for the six months ended June 30, 2017 and 2016 , respectively. Stock Repurchase Program On October 27, 2016, we announced that our board of directors authorized a share repurchase program for up to $20.0 million of our common stock over 12 months. Under the repurchase authorization, shares may be purchased from time to time, subject to general business and market conditions and other investment opportunities, through open market purchases, privately negotiated transactions or other means. The repurchase authorization may be commenced, suspended or discontinued at any time at our discretion. During the six months ended June 30, 2017 , we repurchased 99,735 shares at an average price of $8.18 as a part of a publicly announced program. The repurchased shares were retired upon delivery to us. As of June 30, 2017 , we had $17.4 million remaining authorized to repurchase shares. |