# Step 4. Send data to the server container

## Google Analytics 4

1) **Create a configuration variable** for the server container URL. To do that:

1. Click on the **Variables** menu.
2. Click **New** under the **User-Defined Variable** bar.
3. Click on the **Variable Configuration** bar.
4. Select the type **Google tag: Configuration settings**.
5. Click **Add parameter**.
6. Enter the following parameters:
   1. **Config Parameter**: server_container_url.
   2. **Value**: the URL of your Tag Manager server container.
7. Give your variable a descriptive name and click **Save**

2) **Create a Google Analytics 4 tag**:

1. Click on the **Tags** menu.
2. Click **New**.
3. Click on the **Tag Configuration** tab.
4. Select **Google Analytics** → **Google Tag**.
5. Under **Tag ID**, enter the ID from your GA4 account (to find it, go to your GA4 → click **Admin** → **Data streams** → select the stream → see **Measurement ID**.)
6. Under **Configuration settings**, select the server container variable you created earlier.
7. Under **Triggering**, make sure the option **Initialization - All pages trigger** is selected.
8. Give your tag a descriptive name and click **Save**.
9. Click **Publish** for the container to go live.

3) Next, let’s see how to create a GA4 event, using the **All Clicks** event as an example:

1. Click on the **Tags** menu.
2. Click **New**.
3. Click on the **Tag Configuration** tab.
4. Select **Google Analytics** → **Google Analytics: GA4 Event**.
5. Enter your **Measurement** ID (from the GA4 **Data streams** menu.)
6. Give your event a descriptive name.
7. Click **Triggering** → **All Clicks**.
8. Give the tag a descriptive name.
9. Click **Save**.

Source: https://wascer.com/helpdesk/primeiros-passos-com-hospedagem-sgtm/etapa-4-enviar-dados-ao-container-server
