Custom Events
Custom Events let you track specific actions visitors take on your website or application — watching a demo video, clicking a pricing CTA, downloading a whitepaper — and respond to those actions with Paminga automation.
You define the event here in Account Settings, fire it from your site with a single JavaScript call (or via the API), and Paminga handles the rest: identifying the contact, recording the event, attributing it if it counts as a conversion, and executing any actions you've configured.
This page covers creating and configuring Custom Events. To connect them to automation and view performance data, see Custom Events — Actions & Reporting.
There are two ways to fire a Custom Event:
- From your website — a single JavaScript call via the Paminga tracking beacon. No contact data required; Paminga identifies the visitor automatically from their session.
- Via the GraphQL API — fire server-side from integrations, mobile apps, or backend pipelines by passing the contact's email address.
Managing Custom Events
Custom Events are created and managed under Settings → Account → Custom Events. From there you can create new events, edit existing ones, and delete events you no longer need. Every event you create is immediately available for action configuration and reporting in the Automations area.
Custom Event Settings
Name
The display label for the event — used throughout Paminga and in reporting. Choose something descriptive: Watched Product Video, Visited Pricing Page, Downloaded Whitepaper.
Slug
The slug is what your website code passes to identify which event fired. It must be lowercase letters, numbers, and hyphens only — no spaces, no underscores, no uppercase.
Valid examples: watched-product-video, visited-pricing-page, downloaded-whitepaper-q1
Slugs must be unique within your account. The slugs impression and form-submission are reserved by Paminga and cannot be used.
Description
Optional free-form text. Useful for documenting intent — especially for events whose slug alone might not tell the full story six months from now.
Counts as Conversion
When enabled, firing this event marks it as a conversion and attributes it to the most recent Paminga impression in the visitor's current session. This flows into conversion metrics across Paminga — reporting, attribution, and anywhere conversion rates are calculated.
Enable it for high-intent signals: a demo request, a trial signup, a pricing page visit. Leave it off for informational or mid-funnel tracking events where conversion attribution doesn't apply.
Firing a Custom Event from Your Website
Custom Events are fired via Paminga's website tracking beacon. Once the beacon is installed on your site, firing a custom event is a single JavaScript call:
$__MA.captureEvent('your-event-slug');
Replace your-event-slug with the slug you defined in Paminga. Place this call inside whatever handler fires when the target action occurs — a button click listener, a video play callback, a scroll threshold trigger, etc.
You don't need to pass any contact information. Paminga identifies the visitor automatically from their existing tracking session — the same session established when they first arrived on your site with the beacon present.
Passing Additional Data
You can pass arbitrary metadata with any custom event. This data is stored alongside the event record in Paminga and is accessible in reporting.
$__MA.captureEvent('your-event-slug', {
metadata: {
videoTitle: 'Product Overview',
percentWatched: 87,
planTier: 'enterprise',
}
});
Metadata is a plain JavaScript object. It is JSON-serialized before sending — keep it under 4,096 bytes or it will be dropped.
Timing
The $__MA object is available once the Paminga beacon has finished loading. If you call captureEvent before the beacon loads, it will silently do nothing. The safe pattern is to wait for $__MA using setInterval:
let attempts = 0;
const maxAttempts = 200; // ~6 seconds at 30ms intervals
const id = setInterval(function () {
attempts += 1;
if (window.$__MA !== undefined) {
clearInterval(id);
$__MA.captureEvent('your-event-slug');
return;
}
if (attempts >= maxAttempts) {
clearInterval(id);
}
}, 30);
Custom Events require the Paminga tracking beacon to be present and loaded. Visitors using ad blockers that prevent the beacon from loading will not have their custom events recorded.
Firing via the GraphQL API
If you're working server-side — integrations, mobile apps, backend pipelines — you can fire a Custom Event directly via Paminga's GraphQL API without the browser beacon.
mutation {
triggerCustomEvent(input: {
slug: "your-event-slug"
email: "contact@example.com"
})
}
If no contact exists for the email address, Paminga creates one automatically.
Full Input Reference
| Field | Type | Required | Description |
|---|---|---|---|
slug | String | Yes | The slug of the Custom Event to fire |
email | String | Yes | Contact's email address. Created if not found. |
page_url | String | No | The URL associated with the event |
utm_source | String | No | UTM source |
utm_medium | String | No | UTM medium |
utm_campaign | String | No | UTM campaign |
utm_term | String | No | UTM term |
utm_content | String | No | UTM content |
marketing_channel | MarketingChannel | No | Attribution channel (see enum values below) |
marketing_source | String | No | Attribution source name (matched against your account's marketing sources) |
metadata | JSON | No | Arbitrary key/value data stored with the event. Max 4,096 bytes. |
MarketingChannel Values
| Value | Description |
|---|---|
DIRECT_TRAFFIC | Direct traffic |
ORGANIC_SEARCH | Organic search |
PAID_SEARCH | Paid search |
ORGANIC_SOCIAL | Organic social |
PAID_SOCIAL | Paid social |
EMAIL_MARKETING | Email marketing |
DISPLAY_AD | Display advertising |
REFERRAL | Referral |
VIRTUAL_EVENT | Virtual event |
PHYSICAL_EVENT | Physical event |
OUTBOUND_CALL | Outbound call |
INBOUND_CALL | Inbound call |
DIRECT_MAIL | Direct mail |
AFFILIATE | Affiliate |
OTHER_CAMPAIGNS | Other campaigns |
INTERNAL_TRAFFIC | Internal traffic |
VIDEO_HOSTING_PLATFORM | Video hosting platform |
UNKNOWN | Unknown |
NONE | No channel |
A Note on Attribution
When firing via the API there is no browser session, so visit-level and impression-level conversion attribution is not available. The Counts as Conversion flag on the event is still written for reporting purposes, but no specific impression is attributed.
Actions configured on the Custom Event fire normally.
Once your events are firing, head to Custom Events — Actions & Reporting to configure automation responses and monitor performance.


