Skip to main content

Google Analytics and Tag Manager Events

Google Analytics and Tag Manager Events Why: Automatically track member interactions and lifecycle events to gain insights into your app's performa...

Written by Ken Truesdale

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

  1. Go to Settings in the App Station.

  2. Select Advanced and then Tracking & Scripts.

  3. Enter your GA4 Measurement ID and/or GTM Container ID.

  4. Enable the Custom Tracking Scripts feature.

  5. 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

  1. Install the Google Analytics Debugger or enable debug mode in GA4.

  2. Open Admin → DebugView in your GA4 property.

  3. Perform actions on your app (signup, login, purchase, navigate).

  4. Confirm that mk_signup, mk_login, mk_purchase, and page_view events appear.

GTM Preview

  1. Open GTM and click on Preview.

  2. Connect to your tenant domain.

  3. Navigate through your app and complete lifecycle actions.

  4. Confirm that events appear in the Tag Assistant Data Layer.

Did this answer your question?