File tree Expand file tree Collapse file tree
packages/analytics-plugin-segment Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ const analytics = Analytics({
118118| ` disableAnonymousTraffic ` <br />_ optional_ - boolean| Disable loading segment for anonymous visitors |
119119| ` customScriptSrc ` <br />_ optional_ - boolean| Override the Segment snippet url, for loading via custom CDN proxy |
120120| ` integrations ` <br />_ optional_ - object| Enable/disable segment destinations https://bit.ly/38nRBj3 |
121+ | ` loadIntegrations ` <br />_ optional_ - object| Enable/disable loading of code for segment destinations http://bit.ly/4lWjAee |
121122
122123## Server-side usage
123124
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const config = {
2121 * @param {boolean } [pluginConfig.disableAnonymousTraffic] - Disable loading segment for anonymous visitors
2222 * @param {boolean } [pluginConfig.customScriptSrc] - Override the Segment snippet url, for loading via custom CDN proxy
2323 * @param {object } [pluginConfig.integrations] - Enable/disable segment destinations https://bit.ly/38nRBj3
24+ * @param {object } [pluginConfig.loadIntegrations] - Enable/disable loading of code for segment destinations http://bit.ly/4lWjAee
2425 * @return {object } Analytics plugin
2526 * @example
2627 *
@@ -177,7 +178,8 @@ function initialize({ config, instance }) {
177178 analytics . _loadOptions = e
178179 } ;
179180 analytics . SNIPPET_VERSION = "4.1.0" ;
180- analytics . load ( writeKey ) ;
181+ const loadIntegrations = config . loadIntegrations && { integrations : config . loadIntegrations } || undefined ;
182+ analytics . load ( writeKey , loadIntegrations ) ;
181183 }
182184 }
183185 } ( ) ;
You can’t perform that action at this time.
0 commit comments