Our record backlog reflects our success capturing multiyear commitments from our customers, which in turn improves our customer retention in the future periods and the predictability and visibility of our business. On a geographic basis, we generated 61% of our revenue in North America in the quarter and 39% internationally. Breaking down international revenue a bit more, Europe generated 16% of our revenue and Japan and Asia Pacific generated 23% of revenue in the quarter. Let me now turn to the supplemental metrics we share on a quarterly basis. Recurring dollar retention rate in the first quarter was 85%, which was down from 94% in the previous quarter due primarily to the loss of a large media customer as a result of their company’s acquisition that we previewed last quarter.
As a reminder, this metric only captures renewals in the quarter and upsells at the time of renewal and does not factor in the impact of add-ons during the contract term or multiyear agreements, both of which meaningfully improve our dollar retention. Net revenue retention in the quarter was 92%, which compares to 95% in the previous quarter and 94% in the first quarter of 2023. This decline was primarily due to the previously mentioned acquisition-related loss of a large customer, as well as lower add-on sales performance in the prior year. Net revenue retention did benefit from a growing number of multiyear customer commitments essentially locking in renewals at each contract anniversary. Our customer count at the end of first quarter was 2,502, of which 1,992 were classified as premium customers.
Looking at our ARPU within our premium customer base, our annualized revenue per premium customer was $98,000 and excludes our entry-level pricing for starter customers, which averaged $4,300 in annualized revenue. This represented a growth of 2% over the previous quarter and 10% compared to the first quarter of 2023 and tied an all-time quarterly record. The strong growth in ARPU reflects a combination of our strategy to focus on super serving larger customers and that attrition is mostly concentrated amongst lower ARPU customers. Looking at our results on a GAAP basis. Our gross profit was $30.9 million for the quarter, giving us a gross margin of 61.1%, which is an improvement over 58.7% in the first quarter of 2023. Operating and net income were both positive for the quarter at $2 million and $1.6 million, respectively, as we benefited from a $6 million gain in operations from the sale of patents that Marc detailed earlier.
Net income per share was $0.04 for the quarter based on 44.1 million weighted average shares outstanding. Turning to our non-GAAP results, which exclude the positive impact of our patent sale in addition to our traditional add-backs. Our non-GAAP gross profit in the quarter was $31.7 million compared to $29.6 million in the first quarter of 2023 and represented a gross margin of 63% compared to 60% in the year ago period. Non-GAAP operating income was $1 million in the first quarter compared to non-GAAP operating loss of $5.6 million in the first quarter of 2023. Adjusted EBITDA was $5 million, representing adjusted EBITDA margin of 10% at the high end of our guidance range provided last quarter. This is our third consecutive quarter of double-digit adjusted EBITDA margins.
The ongoing strength in adjusted EBITDA reflects our continued benefit of prior cost savings actions and our ongoing expense discipline. Profitability in the quarter was stronger than a typical first quarter due in part to shifting our annual employee merit pay increase to Q2 this year. Non-GAAP diluted net income per share was $0.01 based on 44.1 million weighted average shares outstanding. This compares to net loss per share of $0.15 based on 42.5 million weighted average shares outstanding in the year ago period. Turning to the balance sheet and cash flow. We ended the quarter with cash and cash equivalents of $22.9 million, which is up from $18.6 million at December 31, reflecting a net increase of cash of $4.3 million in the quarter, driven by $6 million of proceeds from our patent sale.
Free cash flow for the quarter was negative $1 million after taking into account $3 million in capital expenditures and capitalized internal use software and excludes the proceeds from our patent sale. This free cash flow performance was better-than-expected, and we would have generated positive free cash flow if you exclude the portion of our restructuring expense paid in the quarter. I’d like to finish by providing our guidance for the second quarter and the full year 2024. For the second quarter, we are targeting revenue of between $47.5 million and $48.5 million, including approximately $800,000 of overages and approximately $1.8 million of professional services revenue. From a profitability perspective, we expect non-GAAP operating loss to be between $2 million and $1 million and positive adjusted EBITDA to be between $2 million and $3 million.
Non-GAAP net income per share is expected to be in the range of a loss of $0.05 to $0.03 based on 44.6 million weighted average shares outstanding. For the full year, we are maintaining our revenue guidance we provided last quarter of $195 million to $198 million, which includes an estimate of $3.5 million of overage revenue, approximately $8 million of professional services revenue. We are also maintaining our full year guidance from a profitability perspective and expect non-GAAP operating loss to be between $3 million and $1 million and positive adjusted EBITDA to be between $14 million and $16 million. Non-GAAP net loss per share is expected to be in the range of $0.10 to $0.05 based on 44.6 million weighted average shares outstanding. Lastly, we are maintaining our full year free cash flow guidance, which is expected to be between $5.6 million and $8 million.
And we note this does not include the additional $6 million we received this year. In addition, we expect to be free cash flow positive for each of the remaining quarters of the year, building modestly in Q2 and Q3 and further improving in Q4. A few things to keep in mind as you think about our guidance. First, foreign exchange rates have moved against us since the beginning of the year. On a constant currency basis, our revenue and adjusted EBITDA guidance would have both been more than $1 million higher for the full year. Second, there are a couple of points I would like to make, specifically as it relates to Q2. The sequential decline in quarterly revenue is driven by a few factors, including lower subscription revenue due to the Q1 M&A-related customer loss referenced earlier, a $700,000 decrease in professional services revenue and headwinds from unfavorable FX and lower revenue overages, both of which are expected to be several hundred thousand dollars.
In terms of Q2 profitability, the sequential decline from Q1 is driven by a combination of lower revenue, as well as an increase in expenses related to the timing of our annual employee merit pay increase. To wrap up, we had a solid start to the year in Q1. We delivered revenue growth, double-digit adjusted EBITDA margins, and we strengthened our balance sheet with additional cash. We are focused on executing on our key strategic priorities that we expect will result in consistent revenue growth in the future. We are off to a strong start against our profitability and free cash flow targets, and we are confident we will deliver significant improvement in both these metrics for the full year 2024, as outlined in our guidance. Please give us a moment to transition to Q&A, and we’ll be back to discuss our results further.