Getting Started
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시서를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-gtm`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/gtm/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins다음 명령어를 사용하여 플러그인을 설치하고 플랫폼에 따라 다음 지침을 따르세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-gtm` plugin in my project.설치 명령어
bun add @capgo/capacitor-gtmbunx cap syncImport
'Import'라는 제목의 섹션import { GoogleTagManager } from '@capgo/capacitor-gtm';API 개요
API 개요라는 제목의 섹션initialize
'initialize'라는 제목의 섹션지정된 컨테이너 ID와 함께 Google Tag Manager를 초기화합니다.
import { GoogleTagManager } from '@capgo/capacitor-gtm';
await GoogleTagManager.initialize({} as { containerId: string; timeout?: number });push
'push'라는 제목의 섹션Google Tag Manager의 dataLayer에 이벤트를 푸시합니다.
import { GoogleTagManager } from '@capgo/capacitor-gtm';
await GoogleTagManager.push({ event: 'purchase', parameters: { value: 99.99, currency: 'USD' }});setUserProperty
__CAPGO_KEEP_1____CAPGO_KEEP_2__
import { GoogleTagManager } from '@capgo/capacitor-gtm';
await GoogleTagManager.setUserProperty({ key: 'user_type', value: 'premium'});getValue
__CAPGO_KEEP_1____CAPGO_KEEP_3__
import { GoogleTagManager } from '@capgo/capacitor-gtm';
await GoogleTagManager.getValue({} as { key: string });reset
__CAPGO_KEEP_1____CAPGO_KEEP_4__
import { GoogleTagManager } from '@capgo/capacitor-gtm';
await GoogleTagManager.reset();__CAPGO_KEEP_5__
__CAPGO_KEEP_1__이 페이지는 플러그인의 src/definitions.ts. 업스트림에서 API이 변경되면 다시 싱크를 실행하세요.
Getting Started에서 계속
Getting Started에서 계속하기Getting Started를 사용하여 Getting Started 계획 대시보드 및 API 운영을 위해 연결하세요. Using @capgo/capacitor-gtm Using @capgo/capacitor-gtm API 개요 API 개요 소개 __CAPGO_KEEP_0__ API 키 API 키의 구현 세부 사항, 및 장치 __CAPGO_KEEP_0__ 키의 구현 세부 사항.