Custom goal events

Track profile completion, activation milestones, and any in-app action using Grometrics.track(). One line of code per event. Works on web and mobile.

Last updated June 2026

Screen views tell you a user saw something. Goal events tell you they did something. Use them to track actions like profile completion, first purchase, feature adoption, or any other milestone you care about.

Goal events are tracked using the `Grometrics.track()` method. One line of code per event. No configuration needed in the dashboard before firing — events are created automatically when the first one arrives.

Prerequisites

Grometrics SDK installed and verified. Works on web and mobile.

Web: script installation. Mobile: iOS, Android, React Native, and Flutter.

Step 1: Fire events from your code

Call `Grometrics.track()` wherever the action completes. Not when the screen loads — when the action finishes.

Web

1// after profile form submission succeeds2Grometrics.track('profile_completed');34// with optional properties5Grometrics.track('profile_completed', {6  had_avatar: true,7  fields_filled: 4,8});

Step 2: Create goals in the dashboard

Go to Conversions > Goals > Create Goal. Type the event name exactly as it appears in your code. Names are case-sensitive. Grometrics starts counting completions and calculating the conversion rate automatically.

You can also let events auto-create. Any event name fired via `track()` that doesn't have a matching goal will appear in your events list, and you can promote it to a goal from there.

Event naming rules

RuleConstraint
CharactersLowercase letters, numbers, underscores, hyphens only
LengthMaximum 64 characters
SpacesNot allowed
Special charactersNot allowed
Property ruleConstraint
Max properties per event10
Key lengthMaximum 64 characters
Value lengthMaximum 255 characters
Value typesStrings, numbers, booleans
SecurityHTML and script content is auto-stripped from property values

Common event examples

activation.js

1Grometrics.track('account_created');2Grometrics.track('profile_completed');3Grometrics.track('first_project_created');4Grometrics.track('first_message_sent');5Grometrics.track('onboarding_completed');

engagement-and-conversion.js

1Grometrics.track('invite_sent');2Grometrics.track('file_uploaded');3Grometrics.track('comment_posted');4Grometrics.track('share_clicked');56Grometrics.track('pricing_page_viewed');7Grometrics.track('trial_started');8Grometrics.track('upgrade_clicked');9Grometrics.track('checkout_initiated');

mobile-paywall.js

1Grometrics.track('paywall_viewed');2Grometrics.track('paywall_dismissed');3Grometrics.track('trial_started');

What you'll see in the dashboard

MetricDescription
Completion countTotal times this event has been fired
Conversion rateCompletions divided by unique visitors
TrendSparkline showing completions over time
Trend arrowUp/down percentage vs previous period

Click a goal card to see the detail view: completion trend chart, breakdown by source, breakdown by page or screen, and a list of recent visitors who completed the goal.

Using goals in funnels

Goals can be used as funnel steps. Go to Conversions > Funnels > Create Funnel and select Goal as the step type. You can mix goals with screen views and RevenueCat transaction events in the same funnel.

StepTypeValue
1Goalaccount_created
2Goalprofile_completed
3Goalfirst_project_created
4Goalfirst_message_sent

This shows the sequential drop-off between activation milestones. See the activation metrics guide for how to interpret the results and set targets.

Setting a primary KPI

You can pin one goal as your primary KPI in Settings > General > Primary KPI. This highlights it on the dashboard with a colour of your choice, so the number you care most about is always visible.

Requirements

The visitor must have at least one pageview or screen view before goal events are accepted. If `track()` is called before any pageview or screen view has been recorded, the event may be rejected.

This is automatic in normal usage. The SDK records a pageview or screen view on init, which happens before any user action could trigger a goal event.

What happens next

Events start appearing in your Goals page within seconds of deployment. For guidance on which activation metrics to track and what targets to set, see the activation metrics guide

Troubleshooting

Events aren't appearing

Check the event name matches exactly, verify the SDK is initialized, confirm the visitor has at least one pageview or screen view, and wait up to 30 seconds after mobile connectivity returns.

Conversion rate looks wrong

The conversion rate is completions divided by unique visitors for the selected time period. If you want completions divided by signups, build a funnel with account_created as step 1 and your goal as step 2.

Duplicate events

If the same user fires profile_completed twice, both are counted in the completion total but the user is only counted once for conversion rate purposes.

Was this page helpful?