Track WooCommerce course sales by traffic source.
For course creators whose LMS plugin sells each course as a WooCommerce product. Virling ties every enrolment order to the visits before it, from the free lesson to the sales page, so you see which video, email or partner sells each course and which sales page earns the most per visitor. Open source under AGPL, hosted or self-hosted.
Few students enrol on their first visit. They watch a free lesson, leave, get a few emails and come back when the cart opens. WooCommerce keeps the order, and its own order attribution keeps the session that placed it. Virling keeps the visits too, and lines up every one that came before the order.
How an enrolment order finds its visits
The script sets a visitor ID on the first page a student opens, a snippet in functions.php saves it on the order at checkout, and Virling reads orders with a read-only REST API key. A student who types your address on launch day is still credited to the email or video before, since a Direct visit only takes the credit when there is nothing else. Every setup step and a test order are in the WooCommerce docs.
Courses sold through an LMS plugin
Most WordPress LMS plugins link each course to a WooCommerce product and enrol the student once the order is paid. Virling reads that order and nothing from the LMS: not the course, lessons, progress or certificates. Processing and completed orders count as paid, and a bank transfer waits until it is. Virling stores the order total, not its line items, so it cannot split revenue by course on its own: give each course its own sales page and campaign tags, and compare those.
Bundles and coupons
- A bundle is one order. Its whole total is credited to one visit, like a single course, and is not split across the courses inside. A bundle with its own sales page shows up as a row of its own.
- A coupon lowers the total. Revenue is the order total after the discount, so a half-price launch coupon shows half the price. The coupon code is not read: share each coupon through links with their own
utm_campaign, and the Campaign tab shows what each one brought. - A coupon that takes the total to 0 leaves an order that is not imported, like a free enrolment.
- Refunds come off the order. A full or partial refund lowers that order's revenue, so a launch that ends in refunds does not look like a good one. Orders under 60 days old are read again every 6 hours.
Enrolments with no payment
Free courses, students you enrol by hand in the LMS, and access through a 100% coupon leave no paid order, so Virling counts no customer and no revenue for them. Their visits still count, which matters when you compare pages: a free course page with many visitors and no sales lowers revenue per visitor wherever it is the landing page. When a free student later buys a paid course, that order is their first payment, credited to a visit inside the lookback window, and the free course visit is in the order's journey if it falls inside the window too. A paid order you create in the admin for an invoice counts toward revenue, with no visitor ID from checkout.
Compare courses by revenue per visitor on the sales page
With one sales page per course, the Pages card answers which course pays best for its traffic. The Landing page tab lists visitors, revenue and revenue per visitor by the first page of the visit, and the Before paying tab by the last page before the order, which is the one to read when students arrive through a free lesson and move on to the sales page. Click a sales page to filter the dashboard to it, and the Channels card shows which channels brought the students who bought there.
These numbers are made up, to show how to read the card. Three sales pages over one month, with full refunds only:
| Sales page | Price | Visitors | Orders | Refunded | Revenue after refunds | Revenue per visitor |
|---|---|---|---|---|---|---|
| /courses/photo-basics/ | $90 | 2,000 | 40 | 2 | $3,420 | $1.71 |
| /courses/editing/ | $150 | 800 | 20 | 1 | $2,850 | $3.56 |
| /courses/bundle/ | $200 | 500 | 12 | 0 | $2,400 | $4.80 |
| Total | - | 3,300 | 72 | 3 | $8,670 | $2.63 |
Photo basics sells the most, 40 orders, but each visitor to its page is worth $1.71. The bundle page sells 12 and is worth $4.80 a visitor, so it is the page to send the next email to. Click it to see whether those buyers came from email, a partner or search.
A launch by channel: an example
These numbers are made up, to show how to read the report. They are not from a real course and not a benchmark. A $150 course opens for one week, sold with YouTube videos, emails and partner links:
| Channel | Visitors | Orders | Refunded | Revenue after refunds | Revenue per visitor |
|---|---|---|---|---|---|
| 1,000 | 30 | 2 | $4,200 | $4.20 | |
| Social | 3,000 | 22 | 2 | $3,000 | $1.00 |
| Referral | 400 | 20 | 8 | $1,800 | $4.50 |
| Organic search | 1,200 | 9 | 1 | $1,200 | $1.00 |
| Direct | 400 | 4 | 0 | $600 | $1.50 |
| Unattributed | - | 4 | 0 | $600 | - |
| Total | 6,000 | 89 | 13 | $11,400 | $1.90 |
In this example each visitor is counted under one channel, so the rows add up, every order is a student's first and each refund is a full one. Before refunds, Referral looked far ahead at $7.50 a visitor, against $4.50 for Email. But 8 of its 20 orders were refunded, against 2 of 30 for Email, and after refunds the two are close, $4.50 to $4.20. The four Unattributed orders were created in the admin for students who paid by invoice. By default a student who found you on YouTube and enrolled after an email counts as Email; first touch credits the video instead.
See which channel sells your courses
For course creators who sell on WooCommerce. Virling is open source under AGPL: self-host it free, or use the hosted version with a 14-day free trial.
What to know
- Lessons watched on another site, such as YouTube or a course host on its own domain, are not visits. The journey starts when the student lands on a page of yours that runs the script; subdomains such as
learn.yourcourse.comshare the same visitor ID. - A second course bought with the same account counts as a renewal and keeps the channel of the first, and so does an instalment of a payment plan. A guest's second course is credited to its own visit.
- Someone who watches a lesson on a phone and enrols on a laptop is two visitors.
Open source
Virling is open source under AGPLv3, and the code is on GitHub. Use the hosted service, or self-host it as one binary with every feature. In a load test on 2026-10-31, limited to one vCPU and 1 GB of RAM, it took in 100,000 pageviews at 2,829 a second with none failed.
Frequently asked questions
How do I see WooCommerce course sales by traffic source?
Put the script on your lessons and sales pages, add the snippet that saves the virling_vid cookie on each order, and connect the store with a read-only REST API key. The Channels card then shows visitors, revenue and revenue per visitor for every channel, source and campaign.
Does Virling work with my WooCommerce course plugin?
If your LMS plugin sells enrolments as WooCommerce orders through the WooCommerce checkout, yes: those orders are read like any other. Nothing is read from the plugin itself, so lesson progress, completions and enrolments with no paid order are left out.
Can I see that a student watched a free lesson before buying?
Yes, when the lesson page is on your domain or a subdomain and runs the script. The visit is in the journey of the order when it is the same browser and falls inside the lookback window. A free lesson taken as a $0 order is not imported, so the visit is what counts, not the order.
Can Virling show revenue for each course?
Not from the order, since Virling reads the order total and not its line items. With one sales page per course, the Pages card shows revenue and revenue per visitor for each page, and a campaign per course on the links you share does the same in the Campaign tab.
Which channel gets a second course bought by the same student?
The channel of the student's first paid order, when both are placed with the same customer account. The second order counts as a renewal, so the email that sold it is not credited unless the first order is Unattributed.
How are course bundles and coupons counted?
A bundle is one order, credited whole to one visit and not split across its courses. A coupon lowers the order total, and that lower total is the revenue; a coupon that takes the total to 0 leaves an order that is not imported.
Full guides: WooCommerce in the docs, The dashboard and Model and lookback window.