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

# Additional GA4 settings

> Configure custom user properties and event parameters in GA4 to improve SegmentStream integration with your business.

This guide provides step-by-step instructions for implementing custom user properties and event parameters in your Google Analytics 4 (GA4) property.

## Overview

Each section below describes the implementation for one specific property or parameter:

1. Ever Paid (`ever_paid`)
2. Is Bot (`is_bot`)
3. Customer Type (`customer_type`)

All examples include Google Tag Manager (GTM) and gtag.js approaches.

## Ever Paid (user property)

Tracks whether a user has ever made a payment or conversion on your platform. Useful for differentiating actions of paying vs. non-paying users, especially for freemium or subscription-based businesses.

### Expected values

* `true` -- The user has made at least one payment.
* `false` -- The user has never paid.

### Implementation via Google Tag Manager

<Steps>
  <Step title="Create a Data Layer Variable">
    Create a **Data Layer Variable** for `ever_paid`.
  </Step>

  <Step title="Create a GTM Variable">
    Create a Variable inside GTM that reads that value from the dataLayer, name it `ever_paid`.

    <img src="https://mintcdn.com/segmentstream/ZFr6pt66noWB70nu/images/ga4-gtm-ever-paid-variable.png?fit=max&auto=format&n=ZFr6pt66noWB70nu&q=85&s=5a61f4829bc8ebd3f9cf75bf15fe4ab1" alt="GTM ever_paid variable" width="2364" height="1280" data-path="images/ga4-gtm-ever-paid-variable.png" />
  </Step>

  <Step title="Create a GA4 Event Settings Variable">
    If you don't already have one, create a **GA4 Event Settings Variable**.
  </Step>

  <Step title="Add the user property">
    Under the **User Properties** section, add:

    * **Property Name:** `ever_paid`
    * **Value:** Your Data Layer variable (e.g., `{{ever_paid}}`)

          <img src="https://mintcdn.com/segmentstream/ZFr6pt66noWB70nu/images/ga4-gtm-ever-paid-event-settings.png?fit=max&auto=format&n=ZFr6pt66noWB70nu&q=85&s=ac3402b95fd3d7c03bdc4313ac0c4629" alt="GTM ever_paid event settings" width="2328" height="1224" data-path="images/ga4-gtm-ever-paid-event-settings.png" />
  </Step>

  <Step title="Apply to GA4 tags">
    Select this Event Settings Variable in all GA4 configuration and event tags.
  </Step>
</Steps>

### Implementation via gtag.js

```javascript theme={null}
gtag('config', 'GA_MEASUREMENT_ID', {
  'user_properties': {
    'ever_paid': true // or false
  }
});
```

### Create custom dimension in GA4

<Steps>
  <Step title="Navigate to custom definitions">
    Go to **Admin** > **Data display** > **Custom definitions**.
  </Step>

  <Step title="Create custom dimension">
    Click **Create custom dimension** and set:

    * **Scope:** User
    * **Dimension name:** ever\_paid
    * **Description:** Indicates if the user has ever paid
    * **User property:** `ever_paid`

          <img src="https://mintcdn.com/segmentstream/8dSgvo9-hrckH6OT/images/ga4-custom-dimension-ever-paid.png?fit=max&auto=format&n=8dSgvo9-hrckH6OT&q=85&s=a65bca39d91c3f339df532fc8733b477" alt="GA4 custom dimension for ever_paid" width="2380" height="1576" data-path="images/ga4-custom-dimension-ever-paid.png" />
  </Step>

  <Step title="Save">
    Click **Save**.
  </Step>
</Steps>

## Is Bot (user property)

Flags users identified as bots or automated sessions. This allows filtering out bot traffic.

### Expected values

* `true` -- The session/user is identified as a bot.
* `false` -- The user is human.

### Implementation via Google Tag Manager

<Steps>
  <Step title="Create a Data Layer Variable">
    Create a **Data Layer Variable** for `is_bot`.
  </Step>

  <Step title="Create a GTM Variable">
    Create a Variable inside GTM that reads that value from the dataLayer, name it `is_bot`.

    <img src="https://mintcdn.com/segmentstream/ZFr6pt66noWB70nu/images/ga4-gtm-is-bot-variable.png?fit=max&auto=format&n=ZFr6pt66noWB70nu&q=85&s=38448e2a401b7ed1331bd85815dedcae" alt="GTM is_bot variable" width="2366" height="1060" data-path="images/ga4-gtm-is-bot-variable.png" />
  </Step>

  <Step title="Create a GA4 Event Settings Variable">
    If you don't already have one, create a **GA4 Event Settings Variable**.
  </Step>

  <Step title="Add the user property">
    Under the **User Properties** section, add:

    * **Property Name:** `is_bot`
    * **Value:** Your Data Layer variable (e.g., `{{is_bot}}`)

          <img src="https://mintcdn.com/segmentstream/ZFr6pt66noWB70nu/images/ga4-gtm-is-bot-event-settings.png?fit=max&auto=format&n=ZFr6pt66noWB70nu&q=85&s=2e316d4dcabe20108f2f02b8bb824b5d" alt="GTM is_bot event settings" width="2328" height="1224" data-path="images/ga4-gtm-is-bot-event-settings.png" />
  </Step>

  <Step title="Apply to GA4 tags">
    Select this Event Settings Variable in all GA4 configuration and event tags.
  </Step>
</Steps>

### Implementation via gtag.js

```javascript theme={null}
gtag('config', 'GA_MEASUREMENT_ID', {
  'user_properties': {
    'is_bot': true // or false
  }
});
```

### Create custom dimension in GA4

<Steps>
  <Step title="Navigate to custom definitions">
    Go to **Admin** > **Data display** > **Custom definitions**.
  </Step>

  <Step title="Create custom dimension">
    Click **Create custom dimension** and set:

    * **Scope:** User
    * **Dimension name:** is\_bot
    * **Description:** Indicates if the user is identified as a bot
    * **User property:** `is_bot`

          <img src="https://mintcdn.com/segmentstream/8dSgvo9-hrckH6OT/images/ga4-custom-dimension-is-bot.png?fit=max&auto=format&n=8dSgvo9-hrckH6OT&q=85&s=079081824cc2c4fc652ac2bdecc029b2" alt="GA4 custom dimension for is_bot" width="2386" height="1572" data-path="images/ga4-custom-dimension-is-bot.png" />
  </Step>

  <Step title="Save">
    Click **Save**.
  </Step>
</Steps>

## Customer Type (event parameter)

Tracks whether a conversion event comes from a new or returning customer. Helps measure acquisition vs. retention performance.

### Expected values

* `new` -- The customer is making their first purchase.
* `returning` -- The customer has purchased before.

### Implementation via Google Tag Manager

<Steps>
  <Step title="Create a Data Layer Variable">
    Add a **Data Layer Variable** for `customer_type` to the conversion dataLayer event when a user completes a transaction.
  </Step>

  <Step title="Create a GTM Variable">
    Create a Variable inside GTM that reads that value from the dataLayer, name it `customer_type`.

    <img src="https://mintcdn.com/segmentstream/ZFr6pt66noWB70nu/images/ga4-gtm-customer-type-variable.png?fit=max&auto=format&n=ZFr6pt66noWB70nu&q=85&s=0fbdf41b059911974801521cddb60e05" alt="GTM customer_type variable" width="2374" height="1514" data-path="images/ga4-gtm-customer-type-variable.png" />
  </Step>

  <Step title="Add event parameter to GA4 tag">
    Open your GA4 tag that tracks the conversion. Under the **Event Parameters** section, add:

    * **Property Name:** `customer_type`
    * **Value:** Your Data Layer variable (e.g., `{{customer_type}}`)

          <img src="https://mintcdn.com/segmentstream/8dSgvo9-hrckH6OT/images/ga4-gtm-customer-type-event-param.png?fit=max&auto=format&n=8dSgvo9-hrckH6OT&q=85&s=fc2ba6b9c2ccbc717d8d2997fd593d97" alt="GTM customer_type event parameter" width="2302" height="1556" data-path="images/ga4-gtm-customer-type-event-param.png" />
  </Step>
</Steps>

### Implementation via gtag.js

Example adding `customer_type` to the purchase event:

```javascript theme={null}
gtag('event', 'purchase', {
  transaction_id: 'T12345',
  value: 199.99,
  currency: 'USD',
  // Custom parameter: Customer Type
  customer_type: 'new' // "new" or "returning"
});
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.