Setting Up Conversion Tracking
Conversions are tracked by calling thepa.track() function from your website’s JavaScript. The tracking snippet exposes a global pa object that you use to send conversion events to PromptAlpha.
Basic Usage
With Properties
Code Examples
Here are common conversion events and how to implement them: Track a signupEvent names are case-sensitive. Use a consistent naming convention (e.g.,
snake_case) across all your conversion events to keep your data organized.Event Properties Reference
The following properties are recognized by PromptAlpha for attribution and reporting:| Property | Type | Description |
|---|---|---|
email | string | The user’s email address. Used to connect conversions to specific visitors across sessions. |
value | number | The monetary value of the conversion (e.g., purchase amount). |
currency | string | The currency code for the value (e.g., USD, EUR, GBP). Defaults to USD if omitted. |
plan | string | Optional label for subscription plan or tier. |
form | string | Optional label identifying which form was submitted. |
resource | string | Optional label identifying which resource was downloaded. |
The
email property enables cross-session attribution. If a visitor arrives from ChatGPT on Monday and converts on Wednesday (returning via a direct visit), PromptAlpha can still attribute the conversion to ChatGPT if the same email is provided.Full-Funnel Attribution
PromptAlpha tracks the complete journey from AI search discovery to conversion:- AI search appearance — your content is surfaced in an AI search engine
- Click-through — the user clicks a link and arrives on your website
- Page visit — PromptAlpha records the visit and identifies the AI source via the referrer
- Conversion — the user completes a tracked action (signup, purchase, etc.)
Viewing Conversion Data in the Dashboard
Navigate to Agent Analytics > Conversions to see your conversion data. The dashboard includes:- Conversion summary — total conversions, conversion rate, and total revenue from AI-referred traffic
- By AI source — conversions broken down by ChatGPT, Perplexity, Claude, Gemini, and other platforms
- By event type — conversions grouped by event name (e.g.,
signup,purchase,trial_start) - By landing page — which entry pages lead to the most conversions
- Conversion timeline — a trend chart showing conversion volume over time
Revenue Attribution
When you includevalue and currency in your conversion events, PromptAlpha calculates revenue attribution metrics:
- Total AI-attributed revenue — the sum of all conversion values from AI-referred traffic
- Revenue by AI source — how much revenue each AI platform generates
- Average order value — the mean conversion value for AI-referred purchases
- Revenue trend — how AI-attributed revenue changes over time
Implementation Tips
Ensure pa.track() is called after the snippet loads
Ensure pa.track() is called after the snippet loads
The
pa.track() function is available after the tracking snippet finishes loading. Since the snippet uses the defer attribute, it loads after the HTML is parsed but before the DOMContentLoaded event. If you call pa.track() from an inline script in the <head>, it may not be available yet.Recommended approach: call pa.track() from event handlers (e.g., form submission handlers, button click handlers) or from scripts that run after DOMContentLoaded.Avoid duplicate conversion events
Avoid duplicate conversion events
Ensure
pa.track() is called only once per conversion. Common causes of duplicates:- Calling
pa.track()on a confirmation page that the user refreshes - Calling
pa.track()inside a loop or repeated event handler
Test conversion events before going live
Test conversion events before going live
Use your browser’s developer console to verify that
pa.track() calls are executing without errors:- Open your browser’s developer tools (F12 > Console).
- Trigger the conversion action on your site.
- Check the Network tab for outgoing requests to
app.promptalpha.ai. - Verify the request payload contains the correct event name and properties.

