Code Generation - automatically generate code for Snowplow tracking SDKs
info
This documentation only applies to Snowplow BDP. See the feature comparison page for more information about the different Snowplow offerings.
Snowtype is a tool that assists with instrumenting, verifying and maintaining tracking code. Snowtype works with Snowplow tracking SDKs.
Supported trackers
Tracker | Language/s |
---|---|
@snowplow/browser-tracker | javascript, typescript |
@snowplow/node-tracker | javascript, typescript |
@snowplow/react-native-tracker | typescript |
@snowplow/javascript-tracker | javascript |
snowplow-golang-tracker | go |
snowplow-ios-tracker | swift |
snowplow-android-tracker | kotlin |
snowplow-flutter-tracker | dart |
snowplow-java-tracker | java |
Prerequsites
To use Snowtype, you must have Node.js (>=@18) installed.
Installation
Navigate to your project and install Snowtype using your favorite package manager:
- npm
- Yarn
- pnpm
npm install --save-dev @snowplow/snowtype
yarn add --dev @snowplow/snowtype
pnpm add --save-dev @snowplow/snowtype
Executing commands
Installing Snowtype will also create a local executable snowtype
which you can use with npx
, yarn
or pnpm
directly when on your project's directory.
- npm
- Yarn
- pnpm
npx @snowplow/snowtype init
# Same as
npx snowtype init
yarn @snowplow/snowtype init
# Same as
yarn snowtype init
pnpm @snowplow/snowtype init
# Same as
pnpm snowtype init
We will show example commands using npm/npx
but it should work the same with any other package manager.