Skip to main content

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

TrackerLanguage/s
@snowplow/browser-trackerjavascript, typescript
@snowplow/node-trackerjavascript, typescript
@snowplow/react-native-trackertypescript
@snowplow/javascript-trackerjavascript
snowplow-golang-trackergo
snowplow-ios-trackerswift
snowplow-android-trackerkotlin
snowplow-flutter-trackerdart
snowplow-java-trackerjava

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 install --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.

npx @snowplow/snowtype init
# Same as
npx snowtype init

We will show example commands using npm/npx but it should work the same with any other package manager.