Adding a New Destination Definition

Steps to follow to add a new destination on RudderStack

Config-backend

1. Create a new destination definition -

echo '{"name" : "AM", "displayName": "Amplitude", "config": {"includeKeys" : ["apiKey", "trackAllPages", "trackAllScreens", "trackCategorizedPages", "customMappings"], "excludeKeys" : []}}' | http -a ${ADMIN_USER}:${ADMIN_PASSWORD} ${BASE_URL}/destination-definitions

To update an existing destination definition -

echo '{"name" : "GA", "displayName": "Google Analytics", "config": {"includeKeys" : ["trackingID", "trackAllPages", "trackAllScreens", "useNativeSDK", "customMappings"], "excludeKeys" : []}}' | http -a ${ADMIN_USER}:${ADMIN_PASSWORD} ${BASE_URL}/destination-definitions/GA

*This must be done in each of the environments(dev/staging/production).

Webapp

1. Svg icon - Add logo in src/icons/svg and include logo in src/components/icons/destinationIcon.

2. Destination specific fields - Add custom form field for that destination to destinationSettings.json.

destinationSettings.json
{
"HOTJAR": [
{
"title": "Connection Settings",
"fields": [
{
"type": "textInput",
"label": "Site ID",
"value": "siteID",
"regex": ".*",
"required": true,
"placeholder": "e.g: dd412940"
}
]
},
{
"title": "Native SDK",
"fields": [
{
"type": "checkbox",
"label": "Use native SDK to send events",
"value": "useNativeSDK",
"default": false
}
]
}
]
}

3. Destination specific content - Add .md description file in the map of destinationConfigure/index.tsx.

HOTJAR.md
Sends data to Hotjar
#### Best used for
- Heatmaps
- Conversion Funnels
- Visitor Recordings
#### What you will need
- Hotjar account
- site ID for your website
Adding a New Destination