# Google Analytics 4 Tracking

> Google Analytics 4 (GA4) is the latest version of the Google Analytics platform that provides a more advanced and comprehensive view of user behavior across different platforms and devices. It offers cross-device tracking, machine learning-powered insight

- Source: https://docs.ghlcustomercare.com/docs/reporting/tracking-and-attribution/google-analytics-4-tracking
- Section: Reporting / Tracking & Attribution
- Reading time: 3 min
- Images: 13, each explained below
- Modified on Wed, 4 Mar at 8:28 AM

---
Google Analytics 4 (GA4) is the latest version of the Google Analytics platform that provides a more advanced and comprehensive view of user behavior across different platforms and devices. It offers cross-device tracking, machine learning-powered insights, and enhanced event-tracking capabilities.

Concerning our CRM, the recent enhancement to track GA4 events with the measurement-id and API secret means that users of our CRM can now easily use GA4 tracking with their CRM accounts. This will allow them to track and analyze user behavior and engagement across different channels, including their website, mobile app, and social media platforms.

#### **Covered in this Article:**

#### [**Steps to set up Google Analytics 4 in Workflows**](#steps-to-set-up-google-analytics-4-in-workflows-2)

#### [Create or use an existing Google Analytics Workflow](#create-or-use-an-existing-google-analytics-workflow-2)

#### [Get a Measurement ID from your Google Analytics Data Stream](#get-a-measurement-id-from-your-google-analytics-data-stream-2)

#### [Create a Google Analytics event that you want to track](#create-a-google-analytics-event-that-you-want-to-track-2)

#### [Get an API Secret Value from your Data Stream](#get-an-api-secret-value-from-your-data-stream-2)

**Please Note:**

After the workflow execution is completed it will take 24 to 48hrs for the data to reflect in the Google Analytics platform

---

## **Steps to set up Google Analytics 4 in Workflows**

The existing workflow action for Google Analytics in the CRM includes both Google Analytics 4 and Universal Analytics, which means that users can choose to use either platform or both to track their marketing campaigns and website traffic. This provides a more flexible and integrated approach to tracking and analyzing user behavior, which can help businesses make data-driven decisions to improve their marketing strategies and user experience.

### **Create or use an existing Google Analytics Workflow**

In your Google Analytics Workflow, select the action 'Add to Google Analytics.'

A new dropdown value under 'Action Type' has been introduced by the name 'Google Analytics 4'; select this from the dropdown.  
  

![Create or use an existing Google Analytics Workflow (image 1 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284543581/original/pSCnn00j0xET-5lNoI-oIuQK7DxHSPkhpA.png)

**Create or use an existing Google Analytics Workflow (image 1 of 13)**

This screenshot appears in the "Create or use an existing Google Analytics Workflow" section of "Google Analytics 4 Tracking". The text alongside this image reads: A new dropdown value under 'Action Type' has been introduced by the name 'Google Analytics 4'; select this from the dropdown. Immediately after, the guide continues: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set….
- What to fill in: A new dropdown value under 'Action Type' has been introduced by the name 'Google Analytics 4'; select this from the dropdown.
- Next: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.)

### **Get a Measurement ID from your Google Analytics Data Stream**

Go to your [Google Analytics account](https://analytics.google.com/analytics/web/provision/#/provision) and fetch the measurement-id from **Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream.** (Please refer to Google help documentation on [how to Set up Google Analytics](https://support.google.com/analytics/answer/9304153?hl=en) if you do not have it set up.)  
  

![Get a Measurement ID from your Google Analytics Data Stream (image 2 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284545161/original/08UB2GMF7fnHHaSVr9VRErWGBJ-iQhLxDA.png)

**Get a Measurement ID from your Google Analytics Data Stream (image 2 of 13)**

This screenshot appears in the "Get a Measurement ID from your Google Analytics Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.). Immediately after, the guide continues: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.
- Where to go: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.)
- Next: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.

![Get a Measurement ID from your Google Analytics Data Stream (image 3 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284546818/original/qZwT3a5g1F-XxBJUp_06x55GF6qp13aTZw.png)

**Get a Measurement ID from your Google Analytics Data Stream (image 3 of 13)**

This screenshot appears in the "Get a Measurement ID from your Google Analytics Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.). Immediately after, the guide continues: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.
- Where to go: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.)
- Next: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.

Copy the Measurement ID for your desired Data Stream:  

![Get a Measurement ID from your Google Analytics Data Stream (image 4 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284547151/original/YLT7YvK3x0sL9v2IyoBSApaho0IP9X41qQ.png)

**Get a Measurement ID from your Google Analytics Data Stream (image 4 of 13)**

This screenshot appears in the "Get a Measurement ID from your Google Analytics Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.). Immediately after, the guide continues: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.
- Where to go: Go to your Google Analytics account and fetch the measurement-id from Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream. (Please refer to Google help documentation on how to Set up Google Analytics if you do not have it set up.)
- Next: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.

Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.

![Get a Measurement ID from your Google Analytics Data Stream (image 5 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284556825/original/B3TyroHXE8UMwXdxdRAZiRxGvXI_atNKGw.png)

**Get a Measurement ID from your Google Analytics Data Stream (image 5 of 13)**

This screenshot appears in the "Get a Measurement ID from your Google Analytics Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow. Immediately after, the guide continues: You can Add the event name that you wish to track. This event name will show up under the Google Analytics dashboard along with other standard events that are set up. Refer here for the event naming rules by google.
- What to copy: Paste the Measurement ID in the Measurement ID field of your Google Analytics Action in your workflow.
- Next: You can Add the event name that you wish to track. This event name will show up under the Google Analytics dashboard along with other standard events that are set up. Refer here for the event naming rules by google

### **Create a Google Analytics event that you want to track**

You can Add the event name that you wish to track. This event name will show up under the Google Analytics dashboard along with other standard events that are set up. [Refer here for the event naming rules by google](https://support.google.com/analytics/answer/13316687?hl=en)

-   “The **Add to Google Analytics** workflow action supports an optional **Event Value** field.”
    
-   “Use **Event Value** to send a numeric value with the event (for example, revenue, order total, or a score).”
    
-   “In the action UI, this may appear as **`event.value`**. Populate it using a static number or a dynamic value from the workflow.” 
    

### **Get an API Secret Value from your Data Stream**

Add the API secret by navigating to your Google Analytics account **Admin ➝ Account Settings ➝ Data Stream ➝ Select the Data Stream ➝ Measurement Protocol API secrets.**  

**“Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”**

![Get an API Secret Value from your Data Stream (image 6 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284551270/original/-kJ4WRBEGU3sSkAAzvvkLOz5da1zIV9hFg.png)

**Get an API Secret Value from your Data Stream (image 6 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”. Immediately after, the guide continues: Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.
- What this covers: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”
- Next: Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.

![Get an API Secret Value from your Data Stream (image 7 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284551356/original/eeK0BIZ9tHMSteAND_IiSV_-_RryKxsoZA.png)

**Get an API Secret Value from your Data Stream (image 7 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”. Immediately after, the guide continues: Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.
- What this covers: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”
- Next: Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.

![Get an API Secret Value from your Data Stream (image 8 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284551672/original/RlIdIXYuRah3mSzkcUirhp5v8yNAiKkydQ.png)

**Get an API Secret Value from your Data Stream (image 8 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”. Immediately after, the guide continues: Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.
- What this covers: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”
- Next: Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.

**Please Note:**

Before an API Secret can be created you need to acknowledge that you have read and understood Google's privacy disclosures regarding the collection of user data.

![Get an API Secret Value from your Data Stream (image 9 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284552028/original/rxoC8VmUv0JkDm513OpemdU1n30sXB0YUA.png)

**Get an API Secret Value from your Data Stream (image 9 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”. Immediately after, the guide continues: Then click on Create if no API Secret has already been created.
- What this covers: “Event Value is optional. If you don’t need to send a numeric value, you can leave it blank.”
- Next: Then click on Create if no API Secret has already been created.

  
Then click on Create if no API Secret has already been created.  
  

![Get an API Secret Value from your Data Stream (image 10 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284552756/original/GCizmLZKJZvyE_dtxsvG9DPl0srgm95okw.png)

**Get an API Secret Value from your Data Stream (image 10 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Then click on Create if no API Secret has already been created. Immediately after, the guide continues: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.
- What to click: Then click on Create if no API Secret has already been created.
- Next: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.

Name your API secret and then hit **Create,** and a Secret Value will be generated for it automatically.  

![Get an API Secret Value from your Data Stream (image 11 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284552953/original/wQYzdtSU5MCvI9B01CmM0Y11ABmU91vmiw.png)

**Get an API Secret Value from your Data Stream (image 11 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Then click on Create if no API Secret has already been created. Immediately after, the guide continues: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.
- What to click: Then click on Create if no API Secret has already been created.
- Next: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.

![Get an API Secret Value from your Data Stream (image 12 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284553558/original/kZiSvw1Lr4RYkWZumT7ns-UxF-0bOEUdAg.png)

**Get an API Secret Value from your Data Stream (image 12 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Then click on Create if no API Secret has already been created. Immediately after, the guide continues: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.
- What to click: Then click on Create if no API Secret has already been created.
- Next: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.

Copy the Secret Value from here and paste it into the API Secret field in the Google Analytics action in your Workflow.

**Please Note:**

Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.

  

![Get an API Secret Value from your Data Stream (image 13 of 13)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48284555569/original/5Ia3Grxv11-cxX_Rb6BZniRX8wseLXOIIQ.png)

**Get an API Secret Value from your Data Stream (image 13 of 13)**

This screenshot appears in the "Get an API Secret Value from your Data Stream" section of "Google Analytics 4 Tracking". The text alongside this image reads: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.
- What to copy: Make sure there is no space before or after when you paste your API Secret value into the workflow's field or your Google Analytics action will fail.

**Save Action** and then **Save the Workflow**. **Publish** if you are ready to use it.

---

Documentation for GHL Customer Care. Support: support@ghlcustomercare.com