Platform 2 Guide — This article applies to the new platform. Looking for classic platform docs? Browse the Platform 1 collection.
Why: Automatically track member interactions and lifecycle events to gain insights into your app's performance and user behavior, helping you make informed decisions to grow your business.
Navigate: App Station > Settings > Advanced > Tracking & Scripts
Quick Start
Go to Settings in the App Station.
Select Advanced and then Tracking & Scripts.
Enter your GA4 Measurement ID and/or GTM Container ID.
Enable the Custom Tracking Scripts feature.
Save your changes.
Understanding Events Sent to GA4 and GTM
When you configure Google Analytics 4 (GA4) and Google Tag Manager (GTM) in your app, several key member lifecycle events are automatically sent to your GA4 property and GTM container. These events help you track important actions taken by your members.
Member Lifecycle Events
The following events are sent with the mk_ prefix to avoid conflicts with built-in GA4 events:
mk_signup: Triggered when a new account is created or a new OAuth user signs up.Parameters:
method(e.g.,email,oauth_google,oauth_apple).
mk_login: Triggered when a member logs in using email/password or returns via OAuth.Parameters:
method(e.g.,email,oauth_*).
mk_purchase: Triggered when a member successfully completes a purchase.Parameters:
offer_name,access_levels(comma-separated),transaction_id(Stripe session ID).
SPA Page Views
For GTM, a page_view event is sent to the dataLayer on each client-side navigation, allowing you to track how members interact with your app. This does not include the initial page load or App Station routes.
Parameters:
page_path,page_location,page_title.
User ID for Cross-Device Tracking
When a member is logged in, the app sets a user_id using the Member Kitchens user UUID. This allows you to track user journeys across devices and sessions.
Consent Mode v2
Consent Mode v2 is automatically injected before your tracking scripts load. This prepares your app for future cookie consent management.
What Is Not Sent to GA4/GTM
It's important to note that app usage analytics, such as content views, engagement metrics, and member interactions (e.g., favorites, comments), are not sent to GA4 or GTM. These metrics remain available in the App Station analytics dashboards. Use the App Station analytics to track:
Content views (recipes, meal plans, courses)
Engagement metrics (favorites, completions, ratings)
PDF exports and shopping lists
Verifying Events
To ensure that your events are being tracked correctly, you can verify them using GA4 DebugView and GTM Preview.
GA4 DebugView
Install the Google Analytics Debugger or enable debug mode in GA4.
Open Admin → DebugView in your GA4 property.
Perform actions on your app (signup, login, purchase, navigate).
Confirm that
mk_signup,mk_login,mk_purchase, andpage_viewevents appear.
GTM Preview
Open GTM and click on Preview.
Connect to your tenant domain.
Navigate through your app and complete lifecycle actions.
Confirm that events appear in the Tag Assistant Data Layer.
