AI Blocks › Run your online store
Acquisition cost by source calculator
Add ad spend per source. Get the cost to win one new customer from each traffic source.
Acquisition cost by source calculator is a free AI skill for the job "Run your online store". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · MIT licence · Made by 40rty AI
Made by 40rty AI. See the original on GitHub; we copied it as it is, with its licence.
What it does
For every traffic source, you see what it costs to win one new customer. Add your ad spend per source, such as Google, Meta or TikTok, and the skill matches it to new-customer orders from your Shopify store over the window you choose. It reads orders and customers only, so nothing in your store changes. It counts first-time buyers by landing page or referrer, drops any source with too few orders to trust, and divides your spend by customers won. Spend figures come from you, since the skill does not pull from ad platforms. You need a Shopify CLI login with order and customer read access, and spend numbers by source.
You give it
- Your Shopify store domain and a logged-in CLI
- Ad spend per source for the period
- How many days back to look (optional)
- Minimum orders a source needs to be reported (optional)
You get
- Cost per new customer for each source
- New-customer counts by source
- Sources with too few orders left out
- A readable table or JSON output
Use it when
- You spend on three ad channels and cannot tell which one wins customers cheapest.
- You are deciding where to move next month's ad budget.
- Your ad dashboards disagree and you want a count from actual store orders.
- You want to see cost per new customer rather than cost per click.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can access your Shopify admin.