Google Analytics
Add Google Analytics 4 to your Rocket.new app to track page views, conversion events, traffic sources, and campaign attribution from chat.
Describe what you want to measure in chat and Rocket wires up the tracking tags, custom events, and e-commerce data layer automatically.
What you can do
Traffic and page view tracking
See which pages users visit most, where they come from, and how long they stay.
Conversion goals
Track key actions like signups, form submissions, and purchases as GA4 conversion events.
E-commerce tracking
Send product views, add-to-cart actions, and purchase events to GA4 for revenue reporting.
Audience insights
Understand your user demographics, devices, and geographic distribution.
Custom event tracking
Track any interaction as a custom GA4 event with parameters you define.
Before you connect
You need your Measurement ID from Google Analytics. It starts with G-, for example G-XXXXXXXXXX.
Find your Measurement ID from the Google Analytics help center.
Go to Admin > Data Streams, click your stream, and copy the Measurement ID.
Your Measurement ID is embedded in your page's public HTML source and is not a secret. Entering it in the connection popup carries no security risk.
Google Analytics is a task-level connector. Each Rocket task connects to its own Measurement ID independently.
Connect Google Analytics
You can connect from two places. Both do the same thing.
Option 1: From chat
Type a prompt that mentions Google Analytics, for example Connect Google Analytics and track page views on every route. Rocket detects the intent and shows a Connect button inline. Click it to open the credentials popup.


Option 2: From the Connectors tab
Click the ... button in the preview toolbar, then select Connectors.


Click the Google Analytics card, then click Connect.


After clicking Connect
A popup opens. Enter your Measurement ID, then click Connect.


A green dot appears next to Google Analytics when the connection is active.
Update or disconnect
Open Connectors > Google Analytics and click the card. Click Edit to update your Measurement ID or Disconnect to remove the integration from this task.


Example prompts
| What you want | Prompt to use |
|---|---|
| Page views | Track page views on every route and send them to Google Analytics automatically. |
| Button clicks | Track clicks on the Sign Up and Contact Sales buttons as GA4 custom events. |
| Form submissions | Send a conversion event to GA4 when users submit the contact form. |
| E-commerce purchase | Track completed purchases with order total, product names, and quantities in GA4. |
| Scroll depth | Track when users scroll past 25%, 50%, 75%, and 100% of the page. |
| Outbound links | Track clicks on external links as GA4 events with the destination URL. |
| Search tracking | Send a search event to GA4 when users use the site search bar, including the query. |
| Video engagement | Track play, pause, and completion events for embedded videos in GA4. |
| UTM attribution | Parse UTM parameters from the URL and forward them to GA4 as campaign data. |
| User properties | Set GA4 user properties for plan type and signup date when users log in. |
Tips
- Tracking only works on deployed tasks. Google Analytics does not fire events in the Rocket preview. Deploy your task and test on the live URL.
- GA4 data has a processing delay. Real-time reports update within seconds, but standard reports may take 24 to 48 hours to fully populate.
- Only GA4 Measurement IDs are supported. IDs start with
G-. Universal Analytics (UA-) was sunset in 2024 and no longer processes data. - Ad blockers may prevent tracking. Some users run browser extensions that block Google Analytics scripts. Keep this in mind when evaluating traffic numbers.
- One Measurement ID per task. Each Rocket task connects to one Google Analytics property. Use different tasks for different properties.
Revoke access
Your Google Analytics Measurement ID (G-XXXXXXXX) is a public identifier used for client-side tracking, not a secret API key. There is nothing to revoke or delete in the Google Analytics dashboard for this connection.
To stop using Google Analytics in this Rocket task, open the Google Analytics connector card and click Disconnect. You can also click Edit to switch to a different Measurement ID.
Disconnecting removes Google Analytics from this task only. Your GA4 property and Measurement ID stay unchanged.
What's next?
Mixpanel
Need deeper event-level analytics? Add Mixpanel for funnel analysis and user segmentation.
Stripe
Track checkout conversion rates and revenue attribution with Stripe and GA4 together.
AdSense
Monetize your traffic with Google AdSense display ads.
Netlify
Deploy your task so Google Analytics can start collecting real data.

