Skip to content

Commit e61afdd

Browse files
authored
edits
1 parent 9a780fb commit e61afdd

File tree

1 file changed

+5
-14
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+5
-14
lines changed

src/connections/sources/catalog/libraries/website/javascript/index.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -487,32 +487,23 @@ You can modify the `.load` method in Analytics.js (the second line of the snippe
487487

488488
You can only call `.load` on page load, or reload (refresh). If you modify the `.load` method between page loads, it does not have any effect until the page is reloaded.
489489

490-
An example:
490+
For example:
491491

492492
```js
493493
analytics.load('writekey', { integrations: { All: false, 'Google Analytics': true, 'Segment.io': true } })
494494
```
495495

496-
You can also add an `obfuscate` property to the object taken as a second argument, which will obscure the url from which your integrations and destination actions are loaded. This is helpful for names that are commonly flagged by ad blockers.
496+
#### Bundle Obfuscation
497+
You can also add an `obfuscate` property to the object in the second parameter, which obscures the URL from which your integrations and destination actions are loaded. This helps prevent words that are flagged by ad blockers to not be detected in your URL, enabling the integration to properly load.
497498

498-
An example:
499+
For example:
499500

500501
```js
501502
analytics.load('writekey', { obfuscate: true })
502503
```
503504

504-
This value is `false` by default.
505+
The `obfuscate` value is `false` by default.
505506

506-
> info ""
507-
> **Note:** To use this feature, you must be on snippet version 4.1.0 or later. You can get the latest version of the snippet [here](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet).
508-
509-
This way, you can conditionally load integrations based on what customers opt into on your site. The example below shows how you might load only the tools that the user agreed to use.
510-
511-
```js
512-
onConsentDialogClosed(function(consentedTools){
513-
analytics.load('writekey', { integrations: consentedTools })
514-
})
515-
```
516507

517508
## Retries
518509

0 commit comments

Comments
 (0)