v3.7.0.1
STOCK-BASED COMPENSATION - Stock-based Compensation Expense (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2017
Jun. 30, 2016
Jun. 30, 2017
Jun. 30, 2016
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation $ 4,444 $ 5,454 $ 7,997 $ 10,350
Employee Stock Option        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation 820 1,185 1,703 2,331
Unrecognized stock-based compensation expense 3,900   $ 3,900  
Period of recognition of unrecognized stock-based compensation expense     1 year 9 months 26 days  
Restricted Stock Units (RSUs)        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation 3,193 3,544 $ 5,463 6,691
Unrecognized stock-based compensation expense 26,900   $ 26,900  
Period of recognition of unrecognized stock-based compensation expense     2 years 2 months 27 days  
ESPP        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation 431 725 $ 831 1,328
Unrecognized stock-based compensation expense 1,000   $ 1,000  
Period of recognition of unrecognized stock-based compensation expense     5 months 1 day  
Cost of revenue        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation 276 321 $ 547 593
Research and development        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation 1,065 1,366 1,753 2,711
Sales and marketing        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation 1,501 2,063 2,795 3,831
General and administrative        
Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]        
Total stock-based compensation $ 1,602 $ 1,704 $ 2,902 $ 3,215