RudderStack lets you send your event data only to certain intended destinations by filtering out the rest. For the JavaScript SDK, you can do this by passing an integrations
object in the options
parameter of the event method. For most of the other SDKs, you can use the integrations
object parameter for the associated event.
How it works
The following example demonstrates how to send a sample event only to Google Analytics
and Intercom
via the JavaScript SDK:
rudderanalytics.identify( "sample user id", { email: "name@email.org", name: "sample name", }, { integrations: { All: false, "Google Analytics": true, Intercom: true, }, })
All
is always set to true
. This means that RudderStack sends the events to all destinations by default.All: false
instructs RudderStack not to send the event data to any destinations by default, unless they are explicitly set to true
.You can also disable sending event data to certain destinations. In this case, the event data is sent to all the other destinations except the specified ones. An example of how to do this is shown below:
rudderanalytics.identify( "sample user id", { email: "name@email.org", name: "sample name", }, { integrations: { "Google Analytics": false, Intercom: false, }, })
Examples
The following are some examples of the track()
call sent from a variety of SDKs.
JavaScript SDK
rudderanalytics.track( "samplename", "sampleEventName", { email: "name@email.org", name: "Samplename", }, { integrations: { All: false, "Amazon S3": true, "Heap.io": false, }, })
Python SDK
rudder_analytics.track( 'sample event name', { 'email': 'name@email.org', 'name': 'sample name' }, integrations={ 'All': False, 'Amazon S3': True, 'Heap.io': False })
track
events will only be sent to the Amazon S3 and Heap.io destinations.Destination naming convention
To filter the destinations, you need to specify the exact destination names. To get these names, you can go to the RudderStack directory.
Contact us
For more information on any of the sections in this guide, you can contact us or start a conversation in our Slack community.