Docs/Creating Custom Trackers on Your Website

Advanced Tracking

Creating Custom Trackers on Your Website

Build advanced website-side trackers that observe meaningful visitor behavior and send clean RetentionMaster events through RMTrack.

What a custom tracker is

A custom tracker is website-side logic that watches for a business-specific behavior and sends a normalized RetentionMaster action when that behavior happens. It can be a small script on your website, a GTM Custom HTML tag, or logic inside your app after the RetentionMaster snippet loads.

Use custom trackers when the default page_view, trigger, retention asset, and standard GTM action tags are not specific enough. Good examples include plan_selected, calculator_completed, kyc_started, bonus_claimed, trial_limit_reached, or high_value_cart_seen.

Recommended implementation pattern

Install the RetentionMaster master snippet once, define a clear lowercase snake_case action code, then call RMTrack("action_code", payload) when the behavior is confirmed. The public loader queues calls until the full runtime is ready, so early events are still safe.

Keep custom trackers deterministic. Track on a successful state change, confirmed UI event, or backend-confirmed screen, not on every hover, scroll tick, or repeated DOM mutation.

Example custom tracker

document.querySelector("[data-plan=pro]")?.addEventListener("click", function(){ RMTrack("plan_selected", { plan: "pro", source: "pricing_page" }); });

For multi-field payloads, include stable business context such as user_id, plan, amount, currency, page_type, funnel_step, experiment, or product_id. Avoid passwords, card data, and unnecessary personal data.

How it appears in RetentionMaster

Custom tracker events are stored as action-coded events and can be inspected in Data Explorer. If the action should roll up into a canonical KPI, map it in Custom Actions and Event Mapping or the GTM Integration area.

Frequently Asked Questions

Do custom trackers require PRO?

Basic RMTrack calls can be sent by installed sites, but managed custom actions, GTM-fed event workflows, and richer mapping are governed by plan entitlements. PRO and Enterprise are the intended tiers for advanced tracking.

Should I create one tracker per click?

No. Track meaningful business moments. For noisy interactions, aggregate or track only the first qualified event per session.