Our land-and-expand strategy has underpinned a consistently strong dollar-based net retention rate, which was 113% for the quarter ended June 30, 2021, up from 105% for the quarter ended March 31, 2019. Our top 25 customers measured by ARR as of June 30, 2021 have increased their ARR by more than two-and-a-half times (2.5x) following their initial purchase. Approximately 30% of our top 25 customers measured by ARR as of June 30, 2021 purchased our platform for both consumer (including IoT and services) and workforce in their initial transaction; as of June 30, 2021, approximately 60% of the top 25 customers purchased our platform for both consumer (including IoT and services) and workforce. We believe we have significant opportunity for growth within our existing customer base.
Our self-managed offering is packaged and sold as individual stock keeping units, or SKUs, within six product families—Directory, Access Management, Identity Management, Identity Governance, Edge Security, and Autonomous Identity. Our SaaS offering is sold as five separate packages—Identity Core, Access Plus, Identity Plus, Edge and Sync.
Our Business Has Experienced Strong Growth and Gross Margins and Operating Leverage
We have experienced strong growth from a combination of internal drivers and external drivers. Internal drivers include the continuous innovation of our platform, resulting in new technology, products and deployment offerings, a loyal customer base that continues to increase their spend with us over time, and the acquisition of new customers. For example, we have developed and released our SaaS offering (ForgeRock Identity Cloud), Autonomous Identity and Governance in the past two years and both new and existing customers have adopted these offerings. Our effective go-to-market model has also been a driver of our growth, aided by recent leadership recognition by industry analysts. We believe external drivers such as the increasing importance of identity to enterprises, identity being a key enabler of digital transformation, the growing cyber threat landscape and constantly evolving regulatory and compliance requirements are also driving our growth.
In 2019 and 2020 and for the six months ended June 30, 2020 and 2021, our ARR was $106 million, $136 million, $119 million, and $155 million, respectively, representing a year-over-year growth rate of 29% and 30%, respectively. We generate substantially all of our revenue from subscriptions, with 96% and 97% of our total revenue coming from subscriptions in 2020 and for the six months ended June 30, 2021, respectively. In 2019 and 2020 and for the six months ended June 30, 2021, respectively, our total revenue was $104.5 million, $127.6 million, $55.4 million, and $84.8 million, respectively, representing a year-over-year growth rate of 22% and 53%, respectively. In the same periods, we incurred net losses of $36.9 million, $41.8 million, $36.0 million, and $20.1 million, respectively.
Our GAAP gross margin was 84%, 83%, 81%, and 83% in 2019 and 2020 and for the six months ended June 30, 2020 and 2021, respectively. Our GAAP operating loss as a percentage of revenue was (35)%, (25)%, (43)%, and (11)% in 2019 and 2020 and for the six months ended June 30, 2020 and 2021, respectively. Our GAAP net loss as a percentage of revenue was (35)%, (33)%, (65)%, and (24)%, in 2019 and 2020 and for the six months ended June 30, 2020 and 2021, respectively.
Our non-GAAP gross margin was 84%, 83%, 81%, and 83% in 2019 and 2020 and for the six months ended June 30, 2020 and 2021, respectively. Our non-GAAP operating loss as a percent of revenue was (32)%, (20)%, (37)%, and (7)% in 2019 and 2020 and for the six months ended June 30, 2020 and 2021, respectively.
Impact of COVID-19
The ongoing COVID-19 pandemic and efforts to mitigate its impact have significantly curtailed the movement of people, goods and services worldwide, including in the geographic areas in which we conduct our business operations and from which we generate our revenue. It has also caused societal and economic disruption and financial market volatility, resulting in business shutdowns and reduced business activity. We believe that
85