zijra.Documentation
Get started

Custom events and goals

Record actions and define goals. Free includes 3 saved goals.

Send an event

Install the tracker first. Stored event names accept lowercase letters, numbers, underscores, hyphens and colons, from 1 to 64 characters. Use names such as newsletter_subscribed consistently. Properties accept strings, numbers, booleans or null; secrets and direct contact fields are rejected.

Initialize the queue before the deferred tracker loads, then call the same function before or after installation. The tracker drains queued consent and identity decisions before recording queued actions.

Code exampleJavaScript
window.zijra = window.zijra || function () {
  (window.zijra.q = window.zijra.q || []).push(arguments);
};

window.zijra("newsletter_subscribed", {
  campaign: "autumn",
  placement: "footer"
});
Preparing code…

Track HTML actions

Add explicit attributes to a button, form or section. A form event records a submitted attempt; your server or payment provider confirms success separately.

Code exampleHTML
<button data-zijra-goal="checkout_started"
  data-zijra-goal-plan-type="annual">Choose annual</button>

<form data-zijra-goal="newsletter_submitted">...</form>

<section data-zijra-scroll="pricing_viewed"
  data-zijra-scroll-threshold="0.7"
  data-zijra-scroll-delay="2000">...</section>
Preparing code…

Section events fire once for the page path after the visible proportion and delay are met. Browser privacy controls still apply.

Create a goal

Open Events to inspect observed names and properties. In Goals, create an event rule matching newsletter_subscribed, or a page rule such as /thank-you. Goal counts come from collected events in the selected report period.

Free includes 3 saved goals. The same allowance applies to definitions created through the dashboard, API or MCP.

Open events

Consent before attribution

Code exampleJavaScript
// Only after your visitor grants attribution consent:
window.zijra?.("consent", { granted: true });

// When consent is withdrawn:
window.zijra?.("consent", { granted: false });
Preparing code…