Filter selective destinations while sending your event data via RudderStack.
4 minute read
This guide shows you how to leverage the integrations object to filter events to specific destinations when sending them via RudderStack.
Overview
RudderStack lets you send your event data only to specific destination or a set of destinations by filtering out the rest. You can do this by passing an integrations object in the options parameter of your event method.
See the following guides for the SDK-specific documentation and examples:
All is always set to true unless explicitly set to false — this means RudderStack sends the event to all destinations by default.
All: false instructs RudderStack to not send the event to all destinations.
Disable events for specific destinations
You can also disable sending event data to specific destinations. In this case, RudderStack sends the event data to all other destinations except the specified ones.
In the above code snippet, RudderStack will send the event data to all destinations except HubSpot and Intercom.
Destination naming convention
To filter events to specific destinations, use the destination definition display name as the integrations object key. Use the name shown in the RudderStack destination directory, for example, BigQuery, not BQ or a name you assigned to a destination instance.
The destination definition display name is case-sensitive. A key applies to every enabled destination of that type connected to the event’s source, not just one instance. For example, Webhook applies to all enabled Webhook destinations connected to that source; it does not affect Webhook destinations connected only to other sources.
Examples
This section lists some sample events sent from a different SDKs to the specified destinations.
analytics.track(name="Product Added",options=RudderOption(integrations=buildJsonObject{put("All",false)// Event blocked for all destinations
put("Amplitude",true)// Event allowed for Amplitude destination
put("Intercom",true)// Event allowed for Intercom destination
}))
analytics.track(name:"Product Added",options:RudderOption(integrations:["All":false,"Amplitude":true,// Event disabled for all destinations except Amplitude"Intercom":true,// Event disabled for all destinations except Intercom]))
The corresponding Objective-C snippet is shown below:
objective-c
RSSOptionBuilder*optionBuilder=[RSSOptionBuildernew];[optionBuildersetIntegrations:@{@"All":@NO,@"Amplitude":@YES,// Event disabled for all destinations except Amplitude
@"Intercom":@YES,// Event disabled for all destinations except Intercom
}];[analyticstrack:@"Product Added"options:[optionBuilderbuild]];
This site uses cookies to improve your experience. If you want to learn more about cookies and why we use them, visit our cookie policy. We'll assume you're ok with this, but you can opt-out if you wish
Privacy Overview
This site uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.