AI Blocks › Track your numbers
Traffic channel classifier
Give it your visits and orders. Get every one sorted into the same 11 channels, whatever tool it came from.
Traffic channel classifier is a free AI skill for the job "Track your numbers". 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 wizard7558 · Level: advanced
Made by wizard7558. See the original on GitHub; we copied it as it is, with its licence.
What it does
Every visit and order gets one of the same 11 channel labels, whether it came from GA4, a tracking pixel, Shopify or an ad network. Your reports stop disagreeing about what counts as paid social or email. The skill applies one fixed set of rules in a set order: click IDs first, then explicit network, paid medium, native channel, non-paid medium, Shopify type, source hints, referrer, then direct. Anything unclear becomes Other, and the raw signals are kept next to the label. It ships a small script and a BigQuery function, plus test cases. A click ID is treated as a routing clue, not proof that money was spent. It needs Node to run the script.
You give it
- Visit or order rows with source, medium, referrer and click ID fields
- The source system, such as GA4 or Shopify
- Native channel labels already in your data (optional)
- Landing page URLs (optional)
You get
- One of 11 channels for each row
- The rule that chose each label
- A BigQuery function
- Test cases to check the setup
Use it when
- Your GA4 and Shopify reports show different channel totals.
- You are joining data from several sources and need one label set.
- You want a BigQuery function that sorts sessions into channels.
- You need to explain why a visit was labelled paid or organic.
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 run Node code, or SQL on your own BigQuery data.