Przejdź do głównej zawartości

Custom events and customers

Ta treść nie jest jeszcze dostępna w Twoim języku.

Record anything that matters to your shop with track. It works in both commerce modes.

qm("track", "size_guide_opened", { category: "shoes" });
qm("track", "chat.started");
  • Name: lowercase letters, digits, _, . and -, starting with a letter or digit, up to 64 characters. Other names are dropped.
  • Props: an optional plain object, up to 2 KB as JSON. Larger props drop the event. Emails and phone numbers are masked.
  • The event shows as custom:<name>, for example custom:size_guide_opened.

Do not put personal data in custom events.

When a buyer is logged in, pass their customer id on every page load, for example in your layout:

qm("identify", "customer-1042");

Only a hash of the id is sent, never the id itself. On a page without HTTPS, nothing is sent.