highlight / highlight

highlight.io: The open source, full-stack monitoring platform. Error monitoring, session replay, logging, distributed tracing, and more.
https://app.highlight.io
Other
7.52k stars 358 forks source link

self hosted deploy sends analytics data to hubspot / rudderstack #8680

Closed Vadman97 closed 1 month ago

linear[bot] commented 4 months ago

HIG-4702 self hosted deploy sends analytics data to hubspot / rudderstack

greptile-apps[bot] commented 4 months ago

To disable analytics data being sent to HubSpot and RudderStack in a self-hosted deploy, follow these steps:

  1. Modify rudder-initialize.js: Comment out or remove the RudderStack initialization code.
// window.rudderanalytics = await import('rudder-sdk-js')

// rudderanalytics.load(
// '2HMp4bSqggu0Z8W1cn6G5nydUxg',
// 'https://highlightwjh.dataplane.rudderstack.com',
// {
// integrations: { All: true }, // load call options
// },
// )
  1. Modify analytics.ts: Comment out or remove the RudderStack and HubSpot tracking code in the initialize, track, identify, and page functions.
const initialize = () => {
 if (rudderstackInitialized) {
 console.warn('Rudderstack already initialized.')
 return
 }

 rudderstackInitialized = true

 // rudderanalytics.load(
 // '2HMp4bSqggu0Z8W1cn6G5nydUxg',
 // 'https://highlightwjh.dataplane.rudderstack.com',
 // { integrations: { All: true } },
 // )
}

const track = (event: string, metadata?: rudderanalytics.apiObject) => {
 // (window._hsq = window._hsq || []).push([
 // 'trackCustomBehavioralEvent',
 // {
 // name: event,
 // properties: metadata,
 // },
 // ])

 // H.track(event, metadata as Metadata)
 // rudderanalytics.track(event, metadata)
}

const identify = (email: string, traits?: rudderanalytics.apiObject) => {
 // const hsq = (window._hsq = window._hsq || [])
 // hsq.push([
 // 'identify',
 // {
 // email,
 // ...traits,
 // },
 // ])
 // hsq.push(['trackPageView'])

 // H.identify(email, traits as Metadata)
 // rudderanalytics.identify(email, traits)
}

const page = (name: string, properties?: rudderanalytics.apiObject) => {
 // rudderanalytics.page(name, properties)
}
  1. Update Documentation: Ensure the self-hosting documentation reflects these changes, particularly in telemetry.md and any relevant sections in index.md.

References

/highlight.io/scripts/rudder-initialize.js /frontend/src/util/analytics.ts /docs-content/general/4_company/open-source/hosting /docs-content/getting-started/self-host/integrations/index.md

Ask Greptile

Vadman97 commented 4 months ago

/bounty $50

we should disable all hubspot and rudderstack frontend calls in self-hosted hobby deploys, and also validate that no other frontend analytics data is sent with the self-hosted version (ie any other track/page/identify calls leaving the self hosted stack)

algora-pbc[bot] commented 4 months ago

💎 $50 bounty • Highlight (YC W23)

Payment will be awarded to the first person to successfully merge a PR meeting all requirements. In the event that multiple PRs are submitted for the issue, we will award payment to the highest quality PR (the one that has cleanest code, best test coverage, most thorough, etc.).

Steps to solve:

  1. Start working: Comment /attempt #8680 with your implementation plan
  2. Submit work: Create a pull request including /claim #8680 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to highlight/highlight!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🔴 @jemiluv8 May 28, 2024, 10:18:04 PM WIP
🟢 @ezhil56x May 30, 2024, 8:44:27 PM #8700
jemiluv8 commented 4 months ago

/attempt #8680

Algora profile Completed bounties Tech Active attempts Options
@jemiluv8    8 highlight bounties
+ 21 bounties from 9 projects
TypeScript, HTML,
Rust
Cancel attempt
ezhil56x commented 4 months ago

/attempt #8680

Algora profile Completed bounties Tech Active attempts Options
@ezhil56x 29 bounties from 11 projects
JavaScript, TypeScript,
Rust & more
Cancel attempt
algora-pbc[bot] commented 4 months ago

💡 @ezhil56x submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 1 month ago

🎉🎈 @ezhil56x has been awarded $50! 🎈🎊