# 구글 애널리틱스 연동하기

## 구글 애널리틱스 계정 확인하기

구글 애널리틱스 계정과 구글 클라우드 API를 연동하는 방법을 알려드리겠습니다.\
자세한 방법은 아래 순서를 참고해 주세요.

> <mark style="background-color:yellow;">🔎Click! 이미지를 클릭하면 예시 화면을 크게 볼 수 있습니다.</mark>

### 구글애널리틱스 속성 ID 확인하기

1. 구글 애널리틱스에 접속합니다.\
   <https://analytics.google.com/analytics>
2. 설정 > 속성 설정 > 속성 세부정보에서 **속성 ID를** 확인합니다.<br>

   <figure><img src="/files/714WqvtmqasYdCQ6Fw3h" alt=""><figcaption></figcaption></figure>

### 구글 클라우드 키 파일 생성하기

1. 구글 클라우드 플랫폼에 접속합니다.\
   <https://console.cloud.google.com>
2. 아래의 영상을 참고해서 키 파일을 생성해 주세요.

> <mark style="background-color:yellow;">🔎Click! 우측 상단의 화살표 아이콘을 클릭하면 예시 화면을 크게 볼 수 있습니다.</mark>

{% @arcade/embed flowId="rKSjNoIaX6T23zWnh3U0" url="<https://app.arcade.software/share/rKSjNoIaX6T23zWnh3U0>" %}

### 구글 애널리틱스에 서비스계정 추가하기

1. 구글 클라우드 키 파일 단계에서 생성한 서비스 계정을 복사합니다.<br>

   <figure><img src="/files/PfOOobVx8OBZYNC6peKP" alt=""><figcaption></figcaption></figure>
2. 구글 애널리틱스 설정 > 계정 > 계정 엑세스 관리에서 서비스 계정을 추가해 주세요.<br>

   <figure><img src="/files/2nvgUbgltayNNICPIbh6" alt=""><figcaption></figcaption></figure>

### 구글 애널리틱스 사용하기

1. 구글 클라우드 콘솔에 접속합니다.\
   <https://console.cloud.google.com/marketplace/product/google/analyticsdata.googleapis.com?q=search&referrer=search&project=bati-analytics>
2. 프로젝트 선택 후 API를 사용함으로 처리합니다.<br>

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

## 구글 애널리틱스 계정 연결하기

<figure><img src="/files/46eJ8RMIakKngzSjw93E" alt=""><figcaption></figcaption></figure>

* 별칭 : 계정을 구분할 수 있는 별칭을 자유롭게 입력해 주세요.
* API KEY : 1단계에서 확인한 속성 ID를 넣어주세요.
* 키 파일 : 다운로드한 키 파일을 업로드 합니다.


---

# 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://guide.bati.ai/service/api/ga.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.
