JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
박효준
박효준
JSTL 날짜 Format
경매형 이벤트 상품 firebase
마켓몰 GA4
마켓몰 직원가 적용 프로세스
페이레터 결제 승인 대사
미적재건 엑셀 추출
경매형 이벤트 상품 FO
페이레터 대사 내역
GPC BO Front
이미지 편집
골핑 블랙골프데이 본행사 (2022 PC ver.)
Firebase hosting
골핑 검색 최적화
이웃 BO
골핑 nginx 관련
Docker
골핑 Nginx 전환
More
Share
Explore
마켓몰 GA4
주문 완료 Complete.jsp
rtnData
transaction_id: orderM.ordId (거래 ID)
value: orderPayInfo.normalSlAmt(총 상품가격)
currency: KRW (통화)
items: orderList (구매 상품 리스트)t
item_id: webPrdId (상품 ID)
item_name: webPrdNm (상품명)
price: slPc (상품 정가)
quantity: ordQty (상품 개수)
tax: orderPayInfo.pnPayAmt(마일리지 + 상품권 결제) + orderPayInfo.ordPrdDsnAmt (쿠폰 총 할인 금액)
shipping: orderPayInfo.dlvfAmt (총 배송비)
coupon
실수 → 정수형 포맷팅
<
fmt
:parseNumber
var="value" value="
${
rtnData.orderPayInfo.normalSlAmt
}
" integerOnly="true" />
Purchase 이벤트 parameter 정보 출력
<div
style="display: flex
;
flex-direction: column
;
justify-content:center
;
align-items: center
;
margin-top: 10px
;
"
>
<h4>
Purchase 이벤트 내용
</h4>
<div
style="flex-direction: row"
>
<div>
<p>
transaction_id:
${
rtnData.orderM.ordId
}</p>
</div>
<div>
<
fmt
:parseNumber
var="value" value="
${
rtnData.orderPayInfo.normalSlAmt
}
" integerOnly="true" />
<p>
value:
${
value
}</p>
</div>
<div>
<p>
currency: KRW
</p>
</div>
<div>
<
fmt
:parseNumber
var="tax" value="
${
rtnData.orderPayInfo.pnPayAmt + rtnData.orderPayInfo.ordPrdDsnAmt
}
" integerOnly="true" />
<p>
tax:
${
tax
}</p>
</div>
<div>
<
fmt
:parseNumber
var="shipping" value="
${
rtnData.orderPayInfo.dlvfAmt
}
" integerOnly="true" />
<p>
shipping:
${
shipping
}</p>
</div>
<div>
items
</div>
<table
style="border: 1px solid grey
;
margin: 5px"
>
<thead>
<tr>
<th>
item_id
</th>
<th>
item_name
</th>
<th>
price
</th>
<th>
quantity
</th>
</tr>
</thead>
<tbody
style="text-align: center"
>
<
c
:forEach
var="item" items="
${
rtnData.orderList
}
">
<
fmt
:parseNumber
var="price" value="
${
item.slPc
}
" integerOnly="true" />
<tr>
<td>${
item.webPrdId
}</td>
<td>${
item.webPrdNm
}</td>
<td>${
price
}</td>
<td>${
item.ordQty
}</td>
</tr>
</
c
:forEach
>
</tbody>
</table>
</div>
</div>
결과 화면
Gtag Purchase Event 삽입
<%-- Gtag Purchase Event 삽입 --%>
<script>
var
items
= []
<
c
:forEach
var="data" items="
${
rtnData.orderList
}
">
<
fmt
:parseNumber
var="price" value="
${
data.slPc
}
" integerOnly="true" />
items
.
push
({
webPrdId
: `
${
data.webPrdId
}
`
,
webPrdNm
: `
${
data.webPrdNm
}
`
,
price
:
Number
(`
${
price
}
`)
,
quantity
:
Number
(`
${
data.ordQty
}
`)
})
</
c
:forEach
>
<
fmt
:parseNumber
var="value" value="
${
rtnData.orderPayInfo.normalSlAmt
}
" integerOnly="true" />
<
fmt
:parseNumber
var="tax" value="
${
rtnData.orderPayInfo.pnPayAmt + rtnData.orderPayInfo.ordPrdDsnAmt
}
" integerOnly="true" />
<
fmt
:parseNumber
var="shipping" value="
${
rtnData.orderPayInfo.dlvfAmt
}
" integerOnly="true" />
var
purchase_info
= {
transaction_id
: `T_
${
rtnData.orderM.ordId
}
`
,
value
:
Number
(`
${
value
}
`)
,
currency
: 'KRW'
,
items
:
items
,
tax
:
Number
(`
${
tax
}
`)
,
shipping
:
Number
(`
${
shipping
}
`)
,
}
gtag
("event"
,
"purchase"
,
{
transaction_id
: `T_
${
rtnData.orderM.ordId
}
`
,
value
:
Number
(`
${
value
}
`)
,
currency
: 'KRW'
,
items
:
items
,
tax
:
Number
(`
${
tax
}
`)
,
shipping
:
Number
(`
${
shipping
}
`)
})
console
.
log
(
purchase_info
)
</script>
Purchase 시 결제 정보 및 애널리틱스 데이터 확인
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.