# Add To Google Analytics

## Add To Google Analytics

This action fires an event in Google Analytics. The "Google Analytics" event trigger will require you to add the following parameters in a workflow. This technique is used when you want to track more than the page view/visit of the user, you would like to track specific events like submission of the form, user Opt-in or support calls, etc.

<figure><img src="https://3379043218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhRoDQv6gyGL2CyFV4Oob%2Fuploads%2FqZrw8gI6GX88OorTkDBa%2Fspaces_SpDxRsrRdNpxcuWtIMiA_uploads_git-blob-6d4791da2da815c0c52766e96fe7446a71dc4dab_WA%20-%20Google%20analytics%20-%20Edit%20Action%20(1).png?alt=media&#x26;token=4b161317-55ba-4c67-bd45-5d8f58a3af23" alt=""><figcaption></figcaption></figure>

### Edit Action

1. **Action Name:**\
   Type in the action name here or you can use the default name\\
2. **Tracking ID:**\
   \*\*\*\*There are two types of tracking IDs; UA (<mark style="color:blue;">**Universal Analytics**</mark>) and GA4 (<mark style="color:blue;">**Google Analytics For User**</mark>).\
   \
   \> FOR UA USERS, TO GET THE TRACKING CODE;\
   \
   1\. Open Google Analytics and Click the ‘<mark style="color:blue;">Admin</mark>’ tab\
   2\. In the left-hand column, click '<mark style="color:blue;">Tracking Info</mark>' then Click ‘<mark style="color:blue;">Tracking Code</mark>’\
   3\. Your code will be available here. The codes start with “<mark style="color:blue;">UA.</mark>”\
   4\. Copy and paste it into the space provided in the Workflow you are working on.\\\
   \> FOR **GA4** USERS, TO GET THE TRACKING CODE;\
   \
   1\. Open Google Analytics and Click the ‘<mark style="color:blue;">Admin</mark>’ tab\
   2\. In the left-hand column, click '<mark style="color:blue;">Property Settings</mark>**'** then Click '<mark style="color:blue;">Property ID</mark>'\
   3\. Your code will be available here. The codes will be a number\
   4\. Copy and paste it into the space provided in the Workflow you are working on.
3. **Event Category**\
   \*\*\*\*Type in the event Category here, for example, 'Form Submission'. You can also use the custom value to add a category.\\
4. **Event Action**\
   \*\*\*\*Add the Event Action that you want to happen when a visitor views the Form Submission. For Example, 'Exit Form Opt-in'. \\
5. **Event Label**\
   \*\*\*\*Label the event for easy identification. For example, 'Back Friday form submission'. \\
6. **Event value**\
   \*\*\*\*Add dynamic value with small icon tags to the event here.

<figure><img src="https://3379043218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhRoDQv6gyGL2CyFV4Oob%2Fuploads%2F6f3CRxF4v8uGmfRjq5Ue%2Fspaces_SpDxRsrRdNpxcuWtIMiA_uploads_git-blob-1ff37dcdca1e239f5bc83e9f9220111822d46ef8_WA%20-%20Google%20analytics%20-%20Edit%20Action2%20(1).png?alt=media&#x26;token=5303f52b-4151-49ce-a267-f3febc2ae708" alt=""><figcaption></figcaption></figure>

We follow a set of rules to categorize traffic into a specific source, and check the full page URL and the referring domain, if available, against these rules. The details about rules and sources for tracking are given in the table below.

|           Attribute          |                                                           Rules                                                           |      utm\_medium     |      utm\_source      |
| :--------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :------------------: | :-------------------: |
|        Google Organic        |                                        Referring domain is the Google search engine                                       |        organic       |         Google        |
|          Paid Search         |                            If the utm\_source is google and the referring domain is google.com.                           |          CPC         |         Google        |
|           Facebook           |                                                        facebook.com                                                       |       referral       |        Facebook       |
|          Paid Social         |                        The "utm\_medium" parameter contains "cpc" where utm\_source is facebook.com                       |          CPC         |        Facebook       |
| Direct Traffic or Bookmarked |                                   When there are no referring domains or tracking URLs.                                   |         none         |         Direct        |
|           Referral           |                                                        example.com                                                        |       referral       |      example.com      |
|         Social Media         | <p>Referring domain is a social media site like</p><p>Facebook, Instagram, Youtube, credit, Twitter, Naver, Pinterest</p> |        social        | Social Referring Site |
|        Display Traffic       |                                                        example.com                                                        | cmp, banner, display |      example.com      |

{% hint style="info" %}
Note: If you have set both utm\_medium and utm\_source, we will use them and if any one of them is not available, we will categorize them according to the below-given table.

We pass GCLID (Google Click Identifier) to recognize each unique click.
{% endhint %}

## FAQ

1. **How to find the Category, action, and label in GA4?**\
   \*\*\*\*A Universal Analytics event has a Category, Action, and Label and is its own hit type. In Google Analytics 4 properties, every "hit" is an event; there is no distinction between hit types. For example, when someone views one of your website pages, a page\_view event is triggered.\
   \
   Google Analytics 4 events have no notion of Category, Action, and Label and, unlike Universal Analytics reports, Google Analytics 4 reports do not display Category, Action, and Label. Therefore, it’s better to rethink your data collection in terms of the Google Analytics 4 model rather than port your existing event structure to Google Analytics 4.\\
2. **How to find in GA4 if the setup is working or not?**\
   \*\*\*\*Please go to Google Analytics, and visit the GA4 property. In the navigation, please go to Reporting > Acquisition Reports. If the setup is done correctly, it will show up here and we would say add filters of source and medium (marked in red).

<figure><img src="https://3379043218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhRoDQv6gyGL2CyFV4Oob%2Fuploads%2FsfEGH87V0mFqkItJi9VR%2Fspaces_SpDxRsrRdNpxcuWtIMiA_uploads_git-blob-0e7d5a33ed1f8311a5d132787a4397eea9617658_x2CxeoFrIDUpxT_My_liS1jTU-k_yj5hnQ%20(1).jpeg?alt=media&#x26;token=cdbd5186-f923-405e-aa74-87062caed682" alt=""><figcaption></figcaption></figure>
