# 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.\
   \
   ![](https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FUsDcGHHhAy7Njm3psjO8%2Fimage.png?alt=media\&token=33b82e51-d7ea-4c03-bdf0-ce0386be807c)<br>
2. Choose your service account and select the Edit service account icon.\
   \
   ![](https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FB3pH65yP8BpsI608ogMe%2Fimage.png?alt=media\&token=2706948c-92f2-4218-8aa3-01c2fc12942d)<br>
3. Open the Keys tab and from the Add key option, select **Create new key**.\
   \ <img src="https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FQgUiGuPrk88UoYKShQ5M%2Fimage.png?alt=media&#x26;token=4fe2a322-818c-47aa-b9f4-97aec5f9e374" 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**.\
   \
   ![](https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FXOftt4kPRJokjnGpqm4Q%2Fimage.png?alt=media\&token=c1f9fc7a-e0a9-46d5-9354-da60252828e7)<br>
7. Enter *Google analytics data API* and enable the API.\
   \
   ![](https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FMzHDY82kiu9pIXdpj5sf%2Fimage.png?alt=media\&token=b3192fe1-c7bc-4f47-9aef-6fdbe852f782)\
   ![](https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FPXvGo0znwjd1A0Wsl0ek%2Fimage.png?alt=media\&token=268a3ed0-04b0-4ba1-a44c-395c2b29092e)<br>
8. Send the credentials.json file to your Crownpeak Technical Consultant.
9. Provide the used profile\_ids:\
   \
   ![](https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FCwqDNE6sjetJ1qZp1oVP%2Fimage.png?alt=media\&token=90e5c63b-377f-44e2-8db5-57605aa20b55)<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="https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2F1PghKwkMa4pifxXwK58g%2Fimage.png?alt=media&#x26;token=6fc066cb-17fa-4f6b-9f11-c4061830f05e" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3916646904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfLO8j00CcKdYax4GPUyE%2Fuploads%2FPCrmyk4oeMlDCZM2bdef%2Fimage.png?alt=media&#x26;token=ace96f46-087b-4ab3-b885-af415f86d9dc" 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".
