Website and POS integration: ads learn from real sales, not just inquiries
The challenge: connect the website, the register and the ads
An operator copied every website inquiry into the CRM by hand, and the ads could only count inquiries, so there was no way to tell which campaigns and ads brought in the people who actually bought something. There is no ready-made integration between a website and Loyverse, the client's point-of-sale system, but Loyverse has an API, and that is what we built the solution on.
How the website and Loyverse integration works
- Studied the Loyverse API and wrote our own integration module, since no off-the-shelf solution exists for this setup
- Website inquiries now land in the CRM instantly and automatically, so the operator no longer types anything in by hand
- Each inquiry carries its UTM tags and analytics Client ID, so for every request you can see which channel and which ad brought the person in
- When a sale goes through at the register, the module checks the product code (SKU) and, if it's one of the products the ads are optimized for, sends the purchase data to analytics
- From analytics, the sale and its amount go to the ad platform as a "Sale" goal. The ads start optimizing for real purchases instead of the number of inquiries
- Built it on a reliable stack: JavaScript, GitHub with automatic deployment to Vercel, Google Sheets and Apps Script. The module runs in the cloud, so there's no server for the client to look after
What the integration looks like
The result: an ad budget driven by real sales
Inquiries are no longer copied by hand or lost, and the ad budget now relies on real sales: you can see which campaigns, keywords and audiences bring in paying customers and which bring only leads. What doesn't work gets switched off, and the budget moves to what brings in revenue. The module itself runs smoothly, with zero errors and zero timeouts so far.

