# Sending Analytics Data Using Google Analytics v4

1. Find your service account in **APIs & Services > Credentials**. You will need to create a service account if one doesn't exist yet.\
   \
   ![](/files/8I9ozSso1uzJfujfpHmR)<br>
2. Choose your service account and select the Edit service account icon.\
   \
   ![](/files/r8u10wgdnLy5F4Dkfh9C)<br>
3. Open the Keys tab and from the Add key option, select **Create new key**.\
   \ <img src="/files/c48SYBpJDZcso7MMXmY2" alt="" data-size="original"><br>
4. Click **Create**. The credentials.json file will download to your machine.
5. Go to the [GA cloud console](https://console.cloud.google.com/).
6. From the navigation menu, select **APIs & Services > Library**.\
   \
   ![](/files/yObEFr4qdmbSGeKQAzrM)<br>
7. Enter *Google analytics data API* and enable the API.\
   \
   ![](/files/bVWZiiYPN0IrzpJEeSna)\
   ![](/files/WGtJfTpG53mG1u6Er8YW)<br>
8. Send the credentials.json file to your Crownpeak Technical Consultant.
9. Provide the used profile\_ids:\
   \
   ![](/files/3hR2hexqXCJ5W1KErclx)<br>
10. Flag the following:
    1. If you are a GA 360 customer for Universal Analytics.
    2. In the comments box within the form whether you would like to proceed with the migration as soon as possible or if you would like to wait (GA 360 customers have an additional year from Google to migrate).

### Granting permission to service account email address

1. Log in to Google Analytics.

<figure><img src="/files/gnlZtwfg03d00t9pBMXI" alt=""><figcaption></figcaption></figure>

2. From the left-hand navigation, click **Admin**.
3. From the left-hand navigation, click **User Management**.

<figure><img src="/files/UiUYHfEcI9U7xXJ8ZVH5" alt=""><figcaption></figcaption></figure>

4. In the **Add permissions for** text box, paste the service account email address copied at the end of step 2 above and grant it **Read & Analyze** permissions from the drop-down menu.
5. Click **Add**. The Service Account Email Address will be used by the Fredhopper AProxy only for authentication purposes and will have the minimum privileges, e.g. "Read & Analyze".


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crownpeak.gitbook.io/product-discovery/sending-and-managing-analytics-data/sending-analytics-data-using-google-analytics-v4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
