Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ“ฆ chore: Google Tag Manager ๋Œ€์‹  gtag ์ ์šฉ #310

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

bbearcookie
Copy link
Member

@bbearcookie bbearcookie commented Apr 23, 2024

๐Ÿงฉ ์ด์Šˆ ๋ฒˆํ˜ธ

โœ… ์ž‘์—… ์‚ฌํ•ญ

GA๋ฅผ ์ ์šฉํ•  ๋‹น์‹œ์— ํƒœ๊ทธ ๋งค๋‹ˆ์ € vs gtag ์ค‘ ์–ด๋–ค ๋ฐฉ๋ฒ•์ด ์ข‹์„์ง€ ๋ชฐ๋ž์–ด์„œ ํƒœ๊ทธ ๋งค๋‹ˆ์ €๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์„ค์ •ํ–ˆ์—ˆ์–ด์š”. (ํƒœ๊ทธ ๋งค๋‹ˆ์ €๋Š” ์ฝ”๋“œ ์ž‘์„ฑ ์—†์ด๋„ GA ์ด๋ฒคํŠธ๋ฅผ ๋‹ค๋ฃฐ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์ด๋ผ๊ณ  ํ•˜๋Š” ๋“ฏ ํ•ด์š”.),

๊ทธ๋Ÿฐ๋ฐ ๊ฐœ๋ฐœ์ž๊ฐ€ ํ™œ์šฉํ•˜๊ธฐ์—๋Š” gtag๊ฐ€ ๋” ํŽธํ•˜๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์–ด์„œ ๋ณ€๊ฒฝํ–ˆ์–ด์š”.
(๊ตฌ๊ธ€ ํƒœ๊ทธ ๋งค๋‹ˆ์ € ํŽ˜์ด์ง€์— ๋“ค์–ด๊ฐ€์„œ GUI๋กœ ์ด๋ฒคํŠธ ๋“ฑ๋กํ•˜๊ณ  ์กฐ์ž‘ํ•˜๋Š” ๊ฒƒ ๋ณด๋‹ค, ์ด๋ฒคํŠธ ๋กœ๊น…ํ•˜๋Š” ํ•จ์ˆ˜ ํ˜ธ์ถœํ•˜๋Š” ๊ฒŒ ๋” ๊ฐ„ํŽธ..)

  • Google Tag Manager ๋Œ€์‹  gtag๋ฅผ ์ ์šฉ
  • ๋กœ๊ทธ๋ฅผ ์ „์†กํ•˜๋Š” logEvent ํ•จ์ˆ˜ ์ž‘์„ฑ
  • gtag ํƒ€์ž… ์ •์˜ ์ž‘์„ฑ

๐Ÿ‘ฉโ€๐Ÿ’ป ๊ณต์œ  ํฌ์ธํŠธ ๋ฐ ๋…ผ์˜ ์‚ฌํ•ญ

ํƒ€์ž… ๋ฌธ์ œ

์Šคํฌ๋ฆฐ์ƒท 2024-04-23 214621

์›๋ž˜ @types/gtag.js ํƒ€์ž… ์ •์˜ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, ์™œ ์ธ์ง€ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ ํ˜„์žฌ ํ”„๋กœ์ ํŠธ์—์„œ ์ธ์‹์„ ๋ชปํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ๋„ค์š”.. ๐Ÿ˜ญ ๊ทธ๋ž˜์„œ ์šฐ์„  ํƒ€์ž… ์ •์˜ ํŒŒ์ผ์„ ๊ทธ๋Œ€๋กœ ์„ ์–ธํ–ˆ์–ด์š”.

์ด๋ฒคํŠธ ๋กœ๊น… ๋ฐฉ๋ฒ•

๋กœ๊ทธ๋ฅผ ์ „์†กํ•˜๋Š” logEvent ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ–ˆ์–ด์š”.
์•„์ง GA์—์„œ ๊ธฐ๋ณธ ์ œ๊ณตํ•ด์ฃผ๋Š” ์ด๋ฒคํŠธ ์™ธ์— ์ถ”๊ฐ€์ ์ธ ์ด๋ฒคํŠธ๋ฅผ ๋กœ๊น… ํ•˜๊ณ  ์žˆ์ง„ ์•Š์ง€๋งŒ, ๋งŒ์•ฝ ํŠน์ • ์ด๋ฒคํŠธ๋ฅผ ๊ธฐ๋กํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์‚ฌ์šฉํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”.

์˜ˆ์‹œ๋กœ ์•„๋ž˜์ฒ˜๋Ÿผ ์ด๋ฒคํŠธ ๋กœ๊ทธ๋ฅผ ์ „์†กํ•˜๋ฉด

  const handleEvent = () => {
    logEvent('event', 'my_custom_event', {
      value: '์œผ์•… ์ด๋ฒคํŠธ๋ฅผ ๋ฐœ์ƒํ•œ๋‹ค One์—์„œ',
    });
  };

GA ๋Œ€์‹œ๋ณด๋“œ์—์„œ ์ด๋ ‡๊ฒŒ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.
image

@bbearcookie bbearcookie added the ๐Ÿ“ฆ๏ธ Chore ๋นŒ๋“œ ๋ฐ ํŒจํ‚ค์ง€ ๊ด€๋ จ ์ž‘์—… label Apr 23, 2024
@bbearcookie bbearcookie self-assigned this Apr 23, 2024
@bbearcookie bbearcookie requested a review from easyhyun00 as a code owner April 23, 2024 12:54
Copy link

github-actions bot commented Apr 23, 2024

๐Ÿš€ Storybook Preview ๋ณด๋Ÿฌ๊ฐ€๊ธฐ: https://65a6c73d536a3c43b7c5c9bb-wgjvlpoxqu.chromatic.com/
โฐ ๋ฐฐํฌ ์ผ์‹œ: Thu Apr 25 2024 17:44:55 GMT+0900

Copy link

github-actions bot commented Apr 23, 2024

๐ŸŽฎ React Preview ๋ณด๋Ÿฌ๊ฐ€๊ธฐ: https://dnd-10th-4-frontend-3fa3qjh7e-bbearcookies-projects.vercel.app
โฐ ๋ฐฐํฌ ์ผ์‹œ: Thu Apr 25 2024 17:45:21 GMT+0900

Copy link
Collaborator

@easyhyun00 easyhyun00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‚ฌ์šฉ์ž ์ด๋ฒคํŠธ๋ฅผ ๋กœ๊ทธ๋กœ ์ „์†กํ•ด์„œ GA ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๊ตฐ์š”!! ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค ๐Ÿ‘๐Ÿ‘๐Ÿ‘

@bbearcookie bbearcookie merged commit 08e28a6 into main Apr 26, 2024
8 checks passed
@bbearcookie bbearcookie deleted the chore/#308/gtag branch April 26, 2024 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐Ÿ“ฆ๏ธ Chore ๋นŒ๋“œ ๋ฐ ํŒจํ‚ค์ง€ ๊ด€๋ จ ์ž‘์—…
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google TagManager ๋Œ€์‹  gtag ์ ์šฉ
2 participants