1. GA4 설치, GA4이벤트 만들기

 

🔽(이벤트 입력 코드)🔽

gtag('event', '이벤트', {

'매개변수' : ' 매개변수 값'

}

🔽상황에 맞춰서 입력(</body> 전에 입력)🔽

  <script>
      document.querySelector('#download-button').addEventListener('click', function(){
          gtag('event', 'click_button', {
            'name':'원두 카탈로그 다운로드'
          });
        });
      </script>

 

HTML 삽입 모습

2. Ga4 매개변수 확인하는 방법

2-1. 사이트에서 확인하는 방법
사이트 F12 클릭 후(또는 마우스 우클릭 - '검사'클릭) > Omnibug > 만들어놓은 이벤트 클릭 후 매개변수 체크

 

 

2-2. GA4에서 확인하기

구성 > Debug View에서 확인> 홈페이지에 심어놓은 이벤트 매개변수 확인 가능

 

*필수선작업* Chrome 확장 프로그램에서 'Google Analytics Debugger' 다운로드 후 on 해주기

다운로드링크 :
https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=ko

 

Google Analytics Debugger

Prints useful information to the JavaScript console by enabling the debug version of the Google Analytics Javascript.

chrome.google.com

🔽디버거 (확장 프로그램) 킨 모습🔽

클릭하면 켜집니다

 

+ Recent posts