Customer adoption continued to grow across all of these products in Q3, contributing to meaningful revenue and contribution ex TAC in the quarter. Notably, in Q3, we witnessed record levels of spend, revenue and contribution ex TAC across our percentage of spend offering further underscoring the growing momentum we are establishing with our mid-market customers. In terms of customer verticals, growth in the quarter was primarily driven by continued gains across our retail, consumer goods and travel customer verticals. From a channel perspective, we delivered another impressive quarter in CTV, again, outpacing the market with robust double-digit growth. Our continued success in CTV can be attributed to the widespread adoption and effectiveness of the Viant Household ID in this inherently cookieless environment.
Furthermore, the substantial impact of our Direct Access program, as previously highlighted by Chris also played a pivotal role in driving CTV spend during the quarter. Notably, in the third quarter, CTV represented more than 1/3 of total ad spend on our platform, retaining its status as our fastest-growing channel. Turning to formats, video, which includes both mobile video and CTV, accounted for well over half of the spend on our platform during the quarter, underscoring our strength in this high-growth format. Likewise, streaming audio continues to emerge as a promising category experiencing strong double-digit growth in the quarter once again. Advertiser spend per active customer increased 11% on a trailing 12-month basis, and we ended the quarter with 301 active customers, a net decline of 13 customers during the period.
This decline is consistent with our previous communication regarding our customer growth strategy, which focuses on fostering deeper relationships with high-quality customers capable of increased spending levels. As part of our strategy, we are deliberately shifting our focus away from lower spend customer segments while actively attracting and onboarding customers with greater long-term value potential. Turning now to operating expenses for the quarter. Our non-GAAP operating expenses totaled $29.4 million, marking a significant 13% year-over-year reduction. This reduction highlights our ongoing commitment to driving operational efficiencies across the organization. As we’ve mentioned in previous quarters, we’re achieving this operating leverage while concurrently making substantial investments in the business.
This is exemplified by a more than 30% increase in the size of our product and engineering teams over this period. Our approach is to strike a balance between realizing efficiency gains and investing in the teams and technologies that will drive our long-term success. The substantial role of AI in fueling many of these productivity enhancements instills a high level of confidence in the sustainability of our progress. We are pleased to report continued acceleration in revenue per employee, which increased 32% in the quarter, an indication of our improving efficiency as an organization. We believe the investments we’re making in AI are enabling us to enhance the efficiency of our entire team, positioning us to generate sustained operating leverage in the quarters ahead.
For the third quarter, we generated adjusted EBITDA of $9.7 million, well above the high end of our guidance, representing an increase of $11.5 million from the prior year period. Adjusted EBITDA margin as a percent of contribution ex TAC was 25% for the quarter, an improvement of more than 30 percentage points from the prior year period. For the third quarter, non-GAAP net income, which excludes stock-based compensation and other items, totaled $7.6 million, which compares to a non-GAAP net loss of $4.4 million in the prior year period. Non-GAAP earnings per Class A share totaled $0.08 in the current quarter, which compares to a loss of $0.06 in the prior year period. In terms of share count, we ended the quarter with 62.6 million Class A and Class B common shares outstanding.
We also ended the quarter with $203 million in cash and cash equivalents which translates to a noteworthy $3.24 per share outstanding. We had $227 million of positive working capital and no debt at quarter end, and we continue to have access to a $75 million undrawn credit facility. This solid financial foundation positions us extremely well to fully capitalize on the substantial market opportunity in front of us. As we look ahead to Q4, we expect to continue our momentum taking share, particularly in the mid-market and benefiting from the continued stabilization in the U.S. advertising environment. For the fourth quarter of 2023, we expect revenue in the range of $64 million to $67 million, representing a year-over-year increase of 20% at the midpoint.