-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Problem
The developer community drives significant trading volume through CoW Protocol integrations with zero core team involvement, but we cannot quantify this impact. The Grants Committee needs hard data to demonstrate developer-generated growth to CoW DAO and secure better developer support/resources. Currently, there's no standardized way to track which volume comes from community developers vs other sources.
Suggested solution
Implement automatic UTM tracking in cow-sdk following the [v0.2.0 schema](https://github.com/cowprotocol/app-data/blob/b47139023dea58f8c6d428c49db9d01fd8ad9b54/src/schemas/utm/v0.2.0.json) with these defaults:
{
"utm": {
"utmCampaign": "developer-cohort",
"utmContent": "", // User customizable
"utmMedium": "cow-sdk@<version>",
"utmSource": "cowmunity",
"utmTerm": "js"
}
}
Usage examples:
// Default behavior - automatic UTM injection
const order = await cowSdk.createOrder({
appData: {
appCode: "myApp"
}
});
// Result: UTM automatically added alongside existing appData
// Custom utmContent via appData
const order = await cowSdk.createOrder({
appData: {
appCode: "myApp",
utm: {
utmContent: "my-custom-identifier" // Only override content
}
}
});
// Or via SDK configuration
const cowSdk = new CowSdk({
utmContent: "my-integration-v2" // Sets custom content for all orders
});
Alternatives considered
- Manual UTM addition: Requiring developers to manually add UTM codes - rejected because it would have low adoption
- Separate analytics SDK: Creating a wrapper library - rejected as it fragments the developer experience
- Server-side attribution: Tracking at API level - rejected as it can't distinguish between direct API usage vs SDK usage
Additional context
- cow-py (Python SDK) is implementing similar tracking: [Issue #61](feat/add-utm-codes-to-orders cowdao-grants/cow-py#61)
- Discord discussion revealed consensus on UTM field standardization across all SDKs
- This data is critical for upcoming grant allocation decisions and demonstrating ROI to CoW DAO
- No core team involvement in driving this developer growth - purely community-driven
Acceptance criteria
- UTM fields are automatically populated for all orders created through the SDK
- Existing
appCode
and other appData fields remain unaffected - Developers can override
utmContent
while other UTM fields remain standardized - SDK version is automatically included in
utmMedium
field - Feature can be disabled if needed (though enabled by default)
- Implementation follows the [v0.2.0 UTM schema](https://github.com/cowprotocol/app-data/blob/b47139023dea58f8c6d428c49db9d01fd8ad9b54/src/schemas/utm/v0.2.0.json)
- Tests verify UTM inclusion in appData hash
- Documentation updated with UTM tracking information
Metadata
Metadata
Assignees
Labels
No labels