Either determine online hours or set up an automatic chat flow with a bot. NLP helps the bot “understand” what consumers are looking for and respond in terms they can understand, Rey Chavez, Director of Member Contact for the credit union, states in a LogMeIn white paper. Of those respondents who would like a bot to have a personality or don’t care, most would prefer the bot to have a friendly personality over a formal or humorous one. When we were originally looking at our TAM back 5 years ago, we did not have companies like this in it. We had a vision five years ago that messaging would become more pervasive than web and apps one day in delivering unique and powerful digital consumer experiences. So long as this remains true, LPSN stock will remain one of the best stocks to buy and hold for the next five to 10 years. The best companies in the world get to do this.
When going through the best website chat software, keep in mind what the most important features are for your business. We sometimes offer premium or additional placements on our website and in our marketing materials to our advertising partners. Use bots to collect visitors’ contacts and other data, get their consent, and supercharge your marketing efforts. And finally, we continued onboarding world-class sales and marketing leaders to help plot our course to even greater growth. Finally, as Rob mentioned, we’re also off to an incredible start with the AI assisted healthcare testing business, and we’re extending the platform to cover a wider range of uses. And revenue retention was again above the high end of our target range of 105% to 115%. In terms of revenue trends by vertical, we continue to see significant revenue growth within the retail and e-commerce space, driven by commerce related uses of the platform.
Thanks, Rob. Impressive execution translated to another quarter of revenue and adjusted EBITDA significantly exceeding the top end of our guidance range. Given the variable nature of this testing revenue in the nascent phase of this business, we’ll continue building a track record before embedding potential growth into guidance. As for the healthcare testing business, we’ve only just begun, and we’d expect margins to improve as the business matures. If needed, the business chat can be conducted from a mobile live chat app. You don’t want to be limited on the number of conversations you can have with your customers just because of your provider. That’s the difference, I don’t consider myself an entrepreneur. Our Gainshare and Consumer businesses also contributed upside in the second quarter, with Gainshare reaching 16% of total revenue. In the second quarter, total revenue grew $119.6 million, up 31% year-over-year, exceeding the midpoint of our previously issued guidance by $6.6 million, despite lapping the pandemic induced acceleration last year.
In the second quarter, we also strategically built on the foundation required to continue accelerating growth. In the second quarter, it marked our fifth consecutive quarter of 25% plus revenue growth, with the last two exceeding 30%, and our fourth consecutive quarter of operation at the Rule of 40. While our strategy to enhance operating leverage clearly delivered the intended results, we see rapidly increasing demand for conversational AI within both care and commerce as an opportunity to grow even faster. The upside was driven primarily by higher-than-expected demand for rapid at-home COVID-19 testing, which pulled forward some revenue in the second quarter that would have otherwise been recognized in the third. In Q2, we also started to see increased demand from brands using our newly released social media integrations as we push into adjacent channels. This enables them to fully integrate it with all their other messaging communication channels that they do with us. Scalable: One-to-many interactions enables agents to serve multiple customers or employees concurrently. The breadth and extensibility of our platform, including the effectiveness of its AI solutions, enables us to deliver personalized and trusted consumer experiences at scale, which is essential for mass adoption.