generate_code
Generate TypeScript or JavaScript tracking code from a data layer spec, including type definitions, helper functions, and event tracking.
Instructions
Generates TypeScript or JavaScript code from a tracking specification or data layer. Includes type definitions, helper functions, and event tracking code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Tracking specification with variables and events | |
| language | No | Target language | typescript |
| dataLayer | No | Data layer object to generate types from | |
| includeHelpers | No | Include helper functions like trackEvent() |