Skip to content

Commit 8f616dc

Browse files
Update section on Ad blockers.md
Update the section about Ad blockers to also cover browser privacy settings as a potential cause for data loss. Additionally, include information about using Edge as a workaround
1 parent 30c092d commit 8f616dc

File tree

1 file changed

+11
-8
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+11
-8
lines changed

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -904,20 +904,23 @@ For more information, visit the [Segment localstorage-retry library](https://git
904904
905905
You can set the `debug` cookie to `analytics.js` to log debug messages from Analytics.js to the console.
906906
907-
## Ad Blocking
908-
Segment doesn't endorse bypassing ad blockers for client-side tracking. Your users have control as to what gets loaded on the page, because they can add a plugin to block third party scripts from loading, which includes Segment. As you can expect some data loss in client-side tracking, there are three routes Segment recommends you to choose from:
907+
## Tracking Blockers and Browser Privacy Settings
909908
910-
1. Honor the decision of the user to implement the ad blocker knowing that unfortunately, some data will be lost.
911-
2. Ask the customer to remove the ad blocker (for example, in the case of large, corporate customers).
912-
3. Move as many events and tracking over to a server-side library as possible, which won't run into the same limitations.
909+
Segment does not endorse bypassing tracking blockers or browser privacy settings for client-side tracking. Your users have control over what gets loaded on their pages, as they can use plugins or browser settings to block third-party scripts, including Segment. As some data loss in client-side tracking is expected, Segment recommends you choose from the following routes:
913910
914-
If the above routes don't work, Segment provides these workarounds to help with tracking and to mitigate data loss:
911+
1. Respect the user's decision to implement tracking blockers or use privacy settings, knowing that, unfortunately, some data will be lost.
912+
2. Ask the customer to disable the tracking blockers or adjust their privacy settings (for example, in the case of large, corporate customers).
913+
3. Move as many events and tracking actions as possible to a server-side library, which won't encounter the same limitations.
914+
915+
If the above routes don’t work, Segment offers these workarounds to assist with tracking and reduce data loss. However, be aware that for client-side tracking, we cannot guarantee their effectiveness:
915916
916917
* Use the [bundle obfuscation](#bundle-obfuscation) feature. You can 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.
917918
918-
* Create a [custom proxy](/docs/connections/sources/catalog/libraries/website/javascript/custom-proxy/). This changes the URL that Segment loads from (cdn.segment.com), as well as the outgoing requests generated when events are triggered (api.segment.io). By setting up proxies for these URLs, some ad blockers won't prevent Segment from loading, which means your events send downstream to your destinations. 
919+
* Create a [custom proxy](/docs/connections/sources/catalog/libraries/website/javascript/custom-proxy/). This changes the URL that Segment loads from (cdn.segment.com), as well as the outgoing requests generated when events are triggered (api.segment.io).
920+
921+
* Consider implementing the [Segment Edge SDK](https://segment.com/blog/twilio-segment-edge-sdk/), leveraging Cloudflare Workers, it facilitates first-party data collection and real-time user profiling for app personalization. It integrates Segment's library into web apps, manages user identity via HTTPOnly cookies, and employs an internal router for efficient data processing and user experience customization. This innovative approach simplifies tracking and personalization for Segment customers. More information available [here[(https://github.com/segmentio/analytics-edge/blob/main/packages/edge-sdk/README.md).
919922
920-
* Consider tracking data using one of Segment's [server-side libraries](/docs/connections/sources/#server). By using a server-side library, you no longer have to worry about ad blockers and privacy browsers preventing Segment from loading. This option may require more code to track something like a `.page()` call, since now you have to manually pass contextual information that otherwise would've been collected automatically by Analytics.js, such as `url`, `path`, `referrer`. Note that some destinations are device-mode only.
923+
* Consider using one of Segments [server-side libraries](/docs/connections/sources/#server). With a server-side library, concerns about tracking blockers and privacy browsers preventing Segment from loading are eliminated. This option may require additional code to track actions like a `.page()` call, as you now need to manually pass contextual information that would have been automatically collected by Analytics.js, such as `url`, `path`, `referrer`. Note that some destinations are device-mode only. device-mode only.
921924
922925
## Add destinations from npm
923926

0 commit comments

Comments
 (0)