>

상세 컨텐츠

본문 제목

[로그분석] GA4 아이템(항목) 맞춤 측정기준 설정 방법!

0. 데이터분석

by 마켓플레이어, 마케터 봉 2024. 11. 13. 18:14

본문

아래 포스팅을 통해 이벤트, 매개변수, 아이템(항목)에 대해 정리했다.

https://marketerbong.tistory.com/118

 

그런데 items 매개변수의 경우 딕셔너리 리스트 형태라고만 쓰고 넘어갔는데, 생각해보니 이 items(항목)별 맞춤 측정 기준을 설정할 수가 있다.

23년도쯤에 업데이트 된 내용이라 처음 세팅만 해놓고 나도 까먹고만 있었던 내용인데, 정리하면서 조금씩 다시 살펴보다 기억났다.

 

자세한 내용은 아래 url을 참고하자.

https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag&hl=en#purchase_item

 

Recommended events  |  Google Analytics  |  Google for Developers

Send feedback Recommended events Stay organized with collections Save and categorize content based on your preferences. Google Analytics sends some event types automatically. This page describes optional, additional events you can configure to measure more

developers.google.com

 

대충 item parameters를 보면, item_id, item_name, coupon, discount, item_category, price, quantity 정도를 사용할 것이다. 보통 상품코드, 상품명, 쿠폰, 할인금액, 카테고리, 가격, 갯수 정도는 주문서에 표시되니까 말이다. (물론 쿠폰과 할인금액은 미표시하는 경우도 있으나, 같이 표시하면 마진율이나 쿠폰별 사용율, 프로모션 등을 정리하기 좋다.)

 

코드는 위 링크에 있지만, 정리하자면 다음과 같다.

gtag("event", "purchase", {
    transaction_id: "T_12345",
    // value는 모든 item의 (price * quantity) 이다.
    // 미국기준이다 보니 여기 예제의 금액 단위는 달러이며, tax가 표시됐다.
    value: 72.05,
    tax: 3.60,
    shipping: 5.99,
    currency: "USD",
    coupon: "SUMMER_SALE",
    items: [
     {
      item_id: "SKU_12345",
      item_name: "Stan and Friends Tee",
      affiliation: "Google Merchandise Store",
      coupon: "SUMMER_FUN",
      discount: 2.22,
      index: 0,
      item_brand: "Google",
      item_category: "Apparel",
      item_category2: "Adult",
      item_category3: "Shirts",
      item_category4: "Crew",
      item_category5: "Short sleeve",
      item_list_id: "related_products",
      item_list_name: "Related Products",
      item_variant: "green",
      location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
      price: 10.01,
      quantity: 3
    },
    {
      item_id: "SKU_12346",
      item_name: "Google Grey Women's Tee",
      affiliation: "Google Merchandise Store",
      coupon: "SUMMER_FUN",
      discount: 3.33,
      index: 1,
      item_brand: "Google",
      item_category: "Apparel",
      item_category2: "Adult",
      item_category3: "Shirts",
      item_category4: "Crew",
      item_category5: "Short sleeve",
      item_list_id: "related_products",
      item_list_name: "Related Products",
      item_variant: "gray",
      location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
      price: 21.01,
      promotion_id: "P_12345",
      promotion_name: "Summer Sale",
      quantity: 2
    }]
});

 

하지만 items 안에 있는 것을 맞춤 측정기준을 넣는 것이기에, 원하는 측정 기준이 있다면 추가해도 된다.

예를 들면, 아래와 같은 코드가 될 수 있다.

gtag("event", "purchase", {
    transaction_id: "20241208-0003",
    value: 52000,
    shipping: 3000,
    currency: "KRW",
    coupon: "SUMMER_SALE",
    items: [
     {
      item_id: "SKU_12345",
      item_name: "BBB",
      coupon: "SUMMER_FUN",
      discount: 5000,
      color: green,
      size: L,
      price: 20000,
      quantity: 2
    },
     {
      item_id: "SKU_12",
      item_name: "CCC",
      coupon: "SUMMER_FUN",
      discount: 3000,
      color: red,
      size: M,
      price: 10000,
      quantity: 2
    },]
});

 

이렇게 items의 맞춤 측정 기준을 등록하는 방법은 간단하다.

아래와 같은 경로를 통해 [새 맞춤 측정기준]을 누르고, 범위를 "항목"으로 세팅하면 된다.

 

맞춤 측정기준과 맞춤 측정항목을 등록하는 방법이 궁금하다면, 아래 링크를 참고하자.

https://marketerbong.tistory.com/107

 

[로그분석] GA4 맞춤 측정항목, 맞춤 측정기준 만드는 방법(w. GTM)

GA4의 기본 측정항목과 측정 기준만으로는 원하는 데이터를 만들 수 없다.그렇기에 맞춤 측정항목과 맞춤 측정기준은 선택이 아닌 필수다. [측정기준, 측정항목 개념] : https://marketerbong.tistory.com/

marketerbong.tistory.com

 

반응형

관련글 더보기