Public LMS loads no tracking code. If your site already uses Google Tag Manager or a similar tool, the plugin tells it about enrollments and sales.
The two events
| Event | When | Details |
|---|---|---|
publms_enrolled | On the page a student sees right after pressing Enroll now on a free course. | course_id and course (the title). |
publms_purchase | When the receipt of a paid order is shown. Orders still waiting for payment, such as offline orders on hold, do not send it. | order (the number), value, currency and course_ids. |
How the events are sent
- Each event is pushed to
window.dataLayerwhen the page has one, as{ event: "publms_purchase", … }with the details. - It is also fired on the page as a
publms:enrolledorpublms:purchasebrowser event, for other tools. - If the page has no
dataLayer, nothing is pushed anywhere. - A small script is loaded only on those two pages, and nothing is loaded from another site.
- Each event fires once: reloading the page in the same browser session does not repeat it.
Privacy
No names or email addresses are sent with these events. For what the plugin stores and sends elsewhere, see Privacy and data.
Use the events in Google Tag Manager
- In Google Tag Manager, add a Custom Event trigger with the event name
publms_purchaseorpublms_enrolled. - Add data layer variables for the details you need, such as
valueandcurrency.
Developers can change or remove the events. See For developers.