> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Analytics

> Track how customers browse and purchase on your Members Portal using Google Analytics 4 or Google Tag Manager.

## Overview

The Members Portal can send page views and user events directly to your **Google Analytics 4** (GA4) property or your **Google Tag Manager** (GTM) container. This lets you measure how customers interact with your portal — from first visit through to signup, bookings, and purchases — using the same analytics tools you already know.

<Note>
  You can use **either** GA4 or GTM, but not both at the same time. If you enable GA4 while GTM is active, GTM will be automatically disabled.
</Note>

## Setup

1. Open the Nexudus admin panel and go to **Settings > Integrations > [Google Analytics](https://dashboard.nexudus.com/settings/integrations/googleanalytics4)**.
2. Enter your **Measurement ID** (starts with `G-`) for GA4, or your **Container ID** (starts with `GTM-`) for Google Tag Manager.
3. Save your changes.

The tracking code is injected automatically on every page of your Members Portal — no additional setup is required.

## What is tracked

### Page views

Every page your customers visit is automatically recorded as a `page_view` event in your GA4 property or GTM dataLayer. This happens on every navigation within the portal, including single-page transitions.

### GA4 event name mapping

Some portal events are mapped to GA4 recommended event names. The table below shows which portal events are renamed before being sent to GA4 / GTM. All other events are sent with their original name.

| Portal event                 | GA4 event name   |
| ---------------------------- | ---------------- |
| `signup_completed`           | `sign_up`        |
| `checkout_completed`         | `purchase`       |
| `booking_purchase_completed` | `purchase`       |
| `plan_purchase_completed`    | `purchase`       |
| `event_purchase_completed`   | `purchase`       |
| `checkout_booking_start`     | `begin_checkout` |
| `login_success`              | `login`          |

***

## Event reference

### Signup funnel

<AccordionGroup>
  <Accordion title="signup_start">
    **When fired:** Customer lands on the signup/checkout page.

    | Property   | Description                                                    |
    | ---------- | -------------------------------------------------------------- |
    | `referrer` | The referring URL that brought the customer to the signup page |
  </Accordion>

  <Accordion title="signup_form_started">
    **When fired:** The signup form step loads for the first time.

    No payload.
  </Accordion>

  <Accordion title="signup_form_submitted">
    **When fired:** Customer submits the main signup form with their personal details.

    No payload.
  </Accordion>

  <Accordion title="signup_form_additional_submitted">
    **When fired:** Customer submits the additional information form during signup (when extra fields are configured).

    No payload.
  </Accordion>

  <Accordion title="signup_form_einvoicing_submitted">
    **When fired:** Customer completes the e-invoicing settings step during signup.

    No payload.
  </Accordion>

  <Accordion title="signup_plan_selected">
    **When fired:** Customer selects a membership plan from the plan list.

    | Property     | Description                                                                            |
    | ------------ | -------------------------------------------------------------------------------------- |
    | `plan_name`  | Name of the selected plan                                                              |
    | `plan_price` | Price of the selected plan                                                             |
    | `plan_id`    | ID of the selected plan                                                                |
    | `plan_type`  | Type of the plan (e.g. recurring, one-off). Only included for plans with a tariff type |
  </Accordion>

  <Accordion title="signup_store_viewed">
    **When fired:** The add-on products step loads during signup.

    No payload.
  </Accordion>

  <Accordion title="signup_store_item_added">
    **When fired:** Customer increases the quantity of an add-on product.

    | Property        | Description               |
    | --------------- | ------------------------- |
    | `product_name`  | Name of the product added |
    | `product_price` | Price of the product      |
  </Accordion>

  <Accordion title="signup_proposal_accepted">
    **When fired:** Customer accepts the proposal/terms and confirms.

    No payload.
  </Accordion>

  <Accordion title="signup_signature_completed">
    **When fired:** Customer completes the e-signature for the proposal document.

    No payload.
  </Accordion>

  <Accordion title="signup_payment_started">
    **When fired:** The payment step loads during signup.

    | Property         | Description                                           |
    | ---------------- | ----------------------------------------------------- |
    | `payment_method` | The pre-selected payment method shown to the customer |
  </Accordion>

  <Accordion title="signup_completed — GA4: sign_up">
    **When fired:** Customer reaches the signup confirmation page after completing all steps.

    | Property         | Description                            |
    | ---------------- | -------------------------------------- |
    | `plan_name`      | Name of the purchased plan             |
    | `payment_method` | Payment method used                    |
    | `value`          | Invoice due amount                     |
    | `currency`       | Currency code (e.g. `USD`, `EUR`)      |
    | `utm_source`     | UTM source (if present on landing URL) |
    | `utm_medium`     | UTM medium (if present)                |
    | `utm_campaign`   | UTM campaign (if present)              |
    | `utm_term`       | UTM term (if present)                  |
    | `utm_content`    | UTM content (if present)               |
  </Accordion>
</AccordionGroup>

### Checkout — starting a purchase

<AccordionGroup>
  <Accordion title="checkout_booking_start — GA4: begin_checkout">
    **When fired:** Customer opens the booking checkout page and the resource details load.

    | Property               | Description                              |
    | ---------------------- | ---------------------------------------- |
    | `resource_id`          | ID of the resource being booked          |
    | `resource_name`        | Name of the resource                     |
    | `resource_type`        | Resource type name (e.g. "Meeting Room") |
    | `system_resource_type` | System resource type identifier          |
  </Accordion>

  <Accordion title="checkout_product_start">
    **When fired:** Customer opens the product checkout page and the product details load.

    | Property       | Description                    |
    | -------------- | ------------------------------ |
    | `product_name` | Name of the product            |
    | `product_type` | System product type identifier |
    | `product_id`   | ID of the product              |
  </Accordion>

  <Accordion title="checkout_event_start">
    **When fired:** Customer opens the event ticket checkout page and the event details load.

    | Property     | Description       |
    | ------------ | ----------------- |
    | `event_name` | Name of the event |
    | `event_id`   | ID of the event   |
  </Accordion>

  <Accordion title="checkout_course_start">
    **When fired:** Customer opens the course checkout page and the course details load.

    | Property      | Description         |
    | ------------- | ------------------- |
    | `course_name` | Title of the course |
    | `course_id`   | ID of the course    |
  </Accordion>
</AccordionGroup>

### Checkout — payment and completion

<AccordionGroup>
  <Accordion title="checkout_payment_submitted">
    **When fired:** Customer submits a payment form. Fired for each payment method (invoice, Stripe, Spreedly, PayPal).

    | Property         | Description                                                       |
    | ---------------- | ----------------------------------------------------------------- |
    | `payment_method` | Payment method used: `invoice`, `stripe`, `spreedly`, or `paypal` |
    | `checkout_type`  | Type of checkout (only for invoice payments)                      |
    | `value`          | Amount being paid                                                 |
    | `currency`       | Currency code                                                     |
  </Accordion>

  <Accordion title="checkout_completed — GA4: purchase">
    **When fired:** Payment is processed and the confirmation page loads. Fired once per checkout regardless of items.

    | Property        | Description                                         |
    | --------------- | --------------------------------------------------- |
    | `checkout_type` | `booking`, `event`, `tariff`, `product`, or `other` |
    | `value`         | Invoice total amount                                |
    | `currency`      | Currency code                                       |
    | `utm_source`    | UTM source (if present on landing URL)              |
    | `utm_medium`    | UTM medium (if present)                             |
    | `utm_campaign`  | UTM campaign (if present)                           |
    | `utm_term`      | UTM term (if present)                               |
    | `utm_content`   | UTM content (if present)                            |
  </Accordion>

  <Accordion title="booking_purchase_completed">
    **When fired:** A booking purchase completes successfully. Fired once per booking in the invoice. Can occur via checkout (payment required) or directly (no payment due).

    | Property               | Description                                                   |
    | ---------------------- | ------------------------------------------------------------- |
    | `value`                | Invoice total amount                                          |
    | `currency`             | Currency code                                                 |
    | `method`               | `checkout` (via payment flow) or `direct` (no payment needed) |
    | `coworker_id`          | ID of the customer                                            |
    | `booking_id`           | ID of the booking                                             |
    | `resource_id`          | ID of the booked resource                                     |
    | `resource_name`        | Name of the booked resource                                   |
    | `resource_type`        | Resource type name                                            |
    | `system_resource_type` | System resource type (direct bookings only)                   |
    | `from_time`            | Booking start time                                            |
    | `to_time`              | Booking end time                                              |
    | `utm_*`                | UTM parameters (if present on landing URL)                    |
  </Accordion>

  <Accordion title="event_purchase_completed — GA4: purchase">
    **When fired:** An event ticket purchase completes successfully. Fired once per attendee in the invoice. Can occur via checkout or directly.

    | Property             | Description                                |
    | -------------------- | ------------------------------------------ |
    | `value`              | Invoice total amount                       |
    | `currency`           | Currency code                              |
    | `method`             | `checkout` or `direct`                     |
    | `coworker_id`        | ID of the customer                         |
    | `event_id`           | ID of the event                            |
    | `event_name`         | Name of the event                          |
    | `event_product_name` | Name of the ticket type (checkout only)    |
    | `attendee_id`        | ID of the attendee record (checkout only)  |
    | `location`           | Event location (direct only)               |
    | `utm_*`              | UTM parameters (if present on landing URL) |
  </Accordion>

  <Accordion title="plan_purchase_completed — GA4: purchase">
    **When fired:** A plan purchase completes successfully. Fired once per contract in the invoice. Can occur via checkout or directly.

    | Property      | Description                                |
    | ------------- | ------------------------------------------ |
    | `value`       | Invoice total amount                       |
    | `currency`    | Currency code                              |
    | `method`      | `checkout` (checkout purchases only)       |
    | `coworker_id` | ID of the customer (checkout only)         |
    | `contract_id` | ID of the contract (checkout only)         |
    | `tariff_name` | Name of the plan (checkout only)           |
    | `tariff_id`   | ID of the plan (checkout only)             |
    | `tariff_type` | Plan type (checkout only)                  |
    | `start_date`  | Contract start date (checkout only)        |
    | `utm_*`       | UTM parameters (if present on landing URL) |
  </Accordion>

  <Accordion title="product_purchase_completed">
    **When fired:** A product purchase completes successfully. Fired once per product in the invoice. Can occur via checkout or directly.

    | Property       | Description                                |
    | -------------- | ------------------------------------------ |
    | `value`        | Invoice total amount                       |
    | `currency`     | Currency code                              |
    | `method`       | `checkout` or `direct`                     |
    | `coworker_id`  | ID of the customer                         |
    | `product_id`   | ID of the product                          |
    | `product_name` | Name of the product                        |
    | `product_type` | System product type                        |
    | `quantity`     | Quantity purchased (checkout only)         |
    | `utm_*`        | UTM parameters (if present on landing URL) |
  </Accordion>
</AccordionGroup>

### Guest checkout

<AccordionGroup>
  <Accordion title="guest_checkout_started">
    **When fired:** Customer clicks "Continue as guest" to proceed without signing in.

    | Property        | Description                                |
    | --------------- | ------------------------------------------ |
    | `checkout_type` | `course`, `product`, `booking`, or `other` |
  </Accordion>

  <Accordion title="guest_account_created">
    **When fired:** Guest customer creates a permanent account after completing their purchase.

    No payload.
  </Accordion>

  <Accordion title="guest_checkout_completed">
    **When fired:** Guest customer's checkout is confirmed and payment succeeds.

    | Property        | Description                                         |
    | --------------- | --------------------------------------------------- |
    | `checkout_type` | `booking`, `event`, `tariff`, `product`, or `other` |
    | `value`         | Invoice total amount                                |
    | `currency`      | Currency code                                       |
    | `utm_*`         | UTM parameters (if present on landing URL)          |
  </Accordion>
</AccordionGroup>

### Bookings

<AccordionGroup>
  <Accordion title="booking_created">
    **When fired:** Customer creates a new booking (before payment, if any is required).

    | Property               | Description                     |
    | ---------------------- | ------------------------------- |
    | `coworker_id`          | ID of the customer              |
    | `resource_id`          | ID of the booked resource       |
    | `resource_name`        | Name of the booked resource     |
    | `resource_type`        | Resource type name              |
    | `system_resource_type` | System resource type identifier |
    | `date`                 | Start date/time of the booking  |
  </Accordion>

  <Accordion title="booking_modified">
    **When fired:** Customer modifies an existing booking (e.g. changes dates or times).

    | Property               | Description                                |
    | ---------------------- | ------------------------------------------ |
    | `coworker_id`          | ID of the customer                         |
    | `booking_id`           | ID of the booking                          |
    | `resource_id`          | ID of the booked resource                  |
    | `resource_name`        | Name of the booked resource                |
    | `resource_type`        | Resource type name                         |
    | `system_resource_type` | System resource type identifier            |
    | `from_time`            | New booking start time                     |
    | `to_time`              | New booking end time                       |
    | `utm_*`                | UTM parameters (if present on landing URL) |
  </Accordion>

  <Accordion title="instant_booking_initiated">
    **When fired:** Customer clicks the book button on a resource to start an instant booking.

    | Property     | Description        |
    | ------------ | ------------------ |
    | `resourceId` | ID of the resource |
  </Accordion>

  <Accordion title="instant_booking_confirmed">
    **When fired:** Customer confirms the instant booking in the confirmation dialog.

    | Property     | Description        |
    | ------------ | ------------------ |
    | `resourceId` | ID of the resource |
  </Accordion>

  <Accordion title="instant_booking_aborted">
    **When fired:** Customer dismisses the instant booking confirmation dialog without confirming.

    | Property     | Description        |
    | ------------ | ------------------ |
    | `resourceId` | ID of the resource |
  </Accordion>

  <Accordion title="booking_cancelled">
    **When fired:** Customer successfully cancels an existing booking.

    | Property     | Description                 |
    | ------------ | --------------------------- |
    | `booking_id` | ID of the cancelled booking |
  </Accordion>

  <Accordion title="predicted_booking_confirm_initiated">
    **When fired:** Customer clicks to confirm a system-suggested booking from their dashboard.

    | Property     | Description                  |
    | ------------ | ---------------------------- |
    | `resourceId` | ID of the suggested resource |
  </Accordion>

  <Accordion title="predicted_booking_confirmed">
    **When fired:** Customer confirms a system-suggested booking in the confirmation dialog.

    | Property     | Description        |
    | ------------ | ------------------ |
    | `resourceId` | ID of the resource |
  </Accordion>

  <Accordion title="predicted_booking_confirm_aborted">
    **When fired:** Customer dismisses the suggested booking confirmation dialog without confirming.

    | Property     | Description        |
    | ------------ | ------------------ |
    | `resourceId` | ID of the resource |
  </Accordion>
</AccordionGroup>

### Events and courses

<AccordionGroup>
  <Accordion title="event_registered">
    **When fired:** Customer registers for an event (before payment, if any is required).

    | Property     | Description       |
    | ------------ | ----------------- |
    | `event_name` | Name of the event |
  </Accordion>

  <Accordion title="event_cancelled">
    **When fired:** Customer cancels their registration for an event.

    | Property   | Description     |
    | ---------- | --------------- |
    | `event_id` | ID of the event |
  </Accordion>

  <Accordion title="course_enrolled">
    **When fired:** Customer enrols in a course (before payment, if any is required).

    | Property      | Description         |
    | ------------- | ------------------- |
    | `course_name` | Title of the course |
    | `course_id`   | ID of the course    |
  </Accordion>

  <Accordion title="lesson_completed">
    **When fired:** Customer finishes a lesson and marks it as complete.

    | Property    | Description             |
    | ----------- | ----------------------- |
    | `lesson_id` | Unique ID of the lesson |
    | `course_id` | ID of the parent course |
  </Accordion>

  <Accordion title="course_completed">
    **When fired:** Customer finishes all lessons and reaches the course completion page.

    | Property    | Description      |
    | ----------- | ---------------- |
    | `course_id` | ID of the course |
  </Accordion>
</AccordionGroup>

### Products

<AccordionGroup>
  <Accordion title="product_added_to_basket">
    **When fired:** Customer adds a product to their basket (from the store or quick-buy flow).

    | Property        | Description          |
    | --------------- | -------------------- |
    | `product_name`  | Name of the product  |
    | `product_price` | Price of the product |
  </Accordion>
</AccordionGroup>

### Authentication

<AccordionGroup>
  <Accordion title="login_success — GA4: login">
    **When fired:** Customer signs in successfully with valid credentials.

    No payload.
  </Accordion>

  <Accordion title="login_failed">
    **When fired:** Customer attempts to sign in with invalid credentials.

    No payload.
  </Accordion>

  <Accordion title="oauth_login_clicked">
    **When fired:** Customer clicks a single sign-on (SSO) button on the sign-in page.

    | Property   | Description                                             |
    | ---------- | ------------------------------------------------------- |
    | `provider` | SSO provider: `google`, `okta`, `azure_ad`, or `openid` |
  </Accordion>

  <Accordion title="logout">
    **When fired:** Customer signs out of their account.

    No payload.
  </Accordion>

  <Accordion title="password_reset_requested">
    **When fired:** Customer submits the forgot-password form to request a password reset email.

    No payload.
  </Accordion>
</AccordionGroup>

### Profile and account

<AccordionGroup>
  <Accordion title="profile_updated">
    **When fired:** Customer saves changes to their personal information.

    No payload.
  </Accordion>

  <Accordion title="billing_details_updated">
    **When fired:** Customer saves changes to their billing information.

    No payload.
  </Accordion>

  <Accordion title="newsletter_subscribed">
    **When fired:** Customer subscribes to the newsletter from the articles page.

    No payload.
  </Accordion>
</AccordionGroup>

### Help desk

<AccordionGroup>
  <Accordion title="contact_us_submitted">
    **When fired:** Customer clicks the "Contact us" button to reach the help desk.

    No payload.
  </Accordion>

  <Accordion title="support_ticket_created">
    **When fired:** Customer creates a new support ticket.

    No payload.
  </Accordion>

  <Accordion title="support_ticket_replied">
    **When fired:** Customer replies to an existing support ticket.

    No payload.
  </Accordion>

  <Accordion title="support_ticket_closed">
    **When fired:** Customer closes an open support ticket.

    No payload.
  </Accordion>
</AccordionGroup>

### Forms

<AccordionGroup>
  <Accordion title="form_submitted">
    **When fired:** Customer submits a custom form page.

    | Property    | Description           |
    | ----------- | --------------------- |
    | `form_id`   | Unique ID of the form |
    | `form_name` | Name of the form      |
  </Accordion>
</AccordionGroup>

### Session and navigation

<AccordionGroup>
  <Accordion title="app_session_start">
    **When fired:** The Members Portal application loads for the first time.

    No payload.
  </Accordion>

  <Accordion title="authenticated_session_start">
    **When fired:** A signed-in customer's session begins (after authentication is confirmed).

    | Property      | Description            |
    | ------------- | ---------------------- |
    | `coworker_id` | ID of the customer     |
    | `user_id`     | ID of the user account |
  </Accordion>

  <Accordion title="guest_session_start">
    **When fired:** An anonymous visitor's session begins (not signed in).

    No payload.
  </Accordion>

  <Accordion title="section_public_entered">
    **When fired:** Customer navigates to a public-facing page (landing, resource list, events, etc.).

    No payload.
  </Accordion>

  <Accordion title="section_auth_entered">
    **When fired:** Customer navigates to the sign-in or authentication pages.

    No payload.
  </Accordion>

  <Accordion title="section_dashboard_entered">
    **When fired:** Customer navigates to their personal dashboard.

    No payload.
  </Accordion>

  <Accordion title="section_location_entered">
    **When fired:** Customer navigates to a location-specific page.

    No payload.
  </Accordion>

  <Accordion title="section_course_entered">
    **When fired:** Customer navigates to a course page.

    No payload.
  </Accordion>

  <Accordion title="section_admin_entered">
    **When fired:** An admin user navigates to the admin section of the portal.

    No payload.
  </Accordion>
</AccordionGroup>

***

## UTM attribution

The Members Portal automatically captures UTM parameters (`utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`) from the landing URL. These are included as properties on conversion events such as `signup_completed`, `checkout_completed`, `booking_purchase_completed`, `plan_purchase_completed`, `event_purchase_completed`, `product_purchase_completed`, and `guest_checkout_completed`.

This means you can track which marketing campaigns are driving signups and purchases without any additional configuration.

## GA4 vs GTM — which should I use?

|                      | GA4 (Measurement ID)           | GTM (Container ID)                       |
| -------------------- | ------------------------------ | ---------------------------------------- |
| **Best for**         | Simple setup, direct analytics | Advanced tag management, multiple tools  |
| **Setup effort**     | Minimal — paste your ID        | Requires GTM container configuration     |
| **Custom tags**      | No                             | Yes — add Facebook Pixel, LinkedIn, etc. |
| **Event forwarding** | Automatic                      | Automatic via dataLayer                  |

If you only need Google Analytics, use the GA4 Measurement ID. If you need to manage multiple marketing tags or apply custom triggers, use Google Tag Manager.
