From 96e834d85f4326ee55abf5a3e9df1943682ab274 Mon Sep 17 00:00:00 2001 From: Tamas Szuromi Date: Thu, 1 Sep 2022 21:09:08 +0200 Subject: [PATCH] sunset vero (#6865) --- packages/common/src/utils/analytics/index.ts | 6 -- packages/common/src/utils/analytics/vero.ts | 95 ------------------- .../content/legal/privacy/privacy_v0.9.0.md | 14 +-- 3 files changed, 8 insertions(+), 107 deletions(-) delete mode 100644 packages/common/src/utils/analytics/vero.ts diff --git a/packages/common/src/utils/analytics/index.ts b/packages/common/src/utils/analytics/index.ts index 9dd1678b66f..b2c4d8ca5e6 100644 --- a/packages/common/src/utils/analytics/index.ts +++ b/packages/common/src/utils/analytics/index.ts @@ -8,7 +8,6 @@ import { getHashedUserId, isAllowedEvent, } from './utils'; -import * as vero from './vero'; if (process.env.NODE_ENV === 'production') { setTimeout(() => { @@ -57,8 +56,6 @@ export async function setAnonymousId() { localStorage.setItem(ANONYMOUS_UID_KEY, anonymousUid); } - - vero.setAnonymousUserId(anonymousUid); } } @@ -68,7 +65,6 @@ export async function setUserId(userId: string, email: string) { amplitude.setUserId(hashedId); sentry.setUserId(hashedId); - vero.setUserId(hashedId, email); } } @@ -87,7 +83,6 @@ export function trackPageview() { }; amplitude.track('pageview', data); - vero.trackPageview(); google.trackPageView(); } } @@ -127,7 +122,6 @@ export default function track(eventName, secondArg: Object = {}) { }; amplitude.track(eventName, data); google.track(eventName, data); - vero.track(eventName, data); sentry.logBreadcrumb({ type: 'analytics', message: eventName, diff --git a/packages/common/src/utils/analytics/vero.ts b/packages/common/src/utils/analytics/vero.ts deleted file mode 100644 index 1daf182a218..00000000000 --- a/packages/common/src/utils/analytics/vero.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { debug, global, ANONYMOUS_UID_KEY } from './utils'; - -let _script; -const _veroq: any[] = [ - ['init', { api_key: '348b8acbc93adcf7c3d647d2abb4f4c22fe880e9' }], -]; - -global.veroq = _veroq; - -/** - * For some reason vero doesn't call it, so we do it for them. - */ -function processArray() { - if ( - typeof global.__vero !== 'undefined' && - typeof global.__vero.processVeroArray === 'function' - ) { - global.__vero.processVeroArray(_veroq); - } -} - -export const trackPageview = () => { - _veroq.push(['trackPageview']); - processArray(); -}; - -// Already start tracking the first pageview -trackPageview(); - -function loadScript() { - return new Promise((resolve, reject) => { - const script = document.createElement('script'); - script.async = true; - script.onload = resolve; - script.onerror = () => { - reject(new Error('Could not load script')); - }; - script.src = '//d3qxef4rp70elm.cloudfront.net/m.js'; - document.body.appendChild(script); - }) - .then(() => { - processArray(); - }) - .catch(() => { - /* ignore */ - }); -} - -export const setAnonymousUserId = (userId: string) => { - if (!_script) { - _script = loadScript(); - } - - _veroq.push([ - 'user', - { - id: userId, - email: 'anon@codesandbox.io', - }, - ]); - processArray(); -}; - -export const setUserId = (userId: string, email: string) => { - if (!_script) { - _script = loadScript(); - } - - debug(`[Vero] Identifying user`); - - _veroq.push([ - 'user', - { - id: userId, - email, - }, - ]); - - try { - const anonymousUid = localStorage.getItem(ANONYMOUS_UID_KEY); - if (anonymousUid) { - debug(`[Vero] Reidentifying from ${anonymousUid} to ${userId}`); - _veroq.push(['reidentify', userId, anonymousUid]); - } - } catch (e) { - /* Ignore */ - } - - processArray(); -}; - -export const track = (eventName: string, data: unknown) => { - _veroq.push(['track', eventName, data]); - processArray(); -}; diff --git a/packages/homepage/content/legal/privacy/privacy_v0.9.0.md b/packages/homepage/content/legal/privacy/privacy_v0.9.0.md index bd44467a4da..f641f109f14 100644 --- a/packages/homepage/content/legal/privacy/privacy_v0.9.0.md +++ b/packages/homepage/content/legal/privacy/privacy_v0.9.0.md @@ -100,12 +100,11 @@ Cookies. CodeSandbox uses tracking, functional and analytical cookies because it enables many convenient features that may save you some time. We use tracking cookies to gather a unique view count of sandboxes and to match a sandbox to users without an account. We allow some of our service providers such as Google -Analytics, Amplitude, Algolia and Vero to store cookies on your device. We -assume you know what cookies are and how to prevent third parties from -installing cookies on your device. If not, your browser settings allow you to -disable cookies and control acceptance levels. Please reach out to us via -details below if you are in doubt or seek assistance in understanding and -changing browser settings. +Analytics, Amplitude, and Algolia to store cookies on your device. We assume you +know what cookies are and how to prevent third parties from installing cookies +on your device. If not, your browser settings allow you to disable cookies and +control acceptance levels. Please reach out to us via details below if you are +in doubt or seek assistance in understanding and changing browser settings. Tracking. We track user behavior and register events such as whether a user has created a template or interacted with an embed to measure the effectiveness of @@ -197,6 +196,9 @@ Syntax: (Company Name (“a.k.a.”), Location, Purpose, Link) [https://stripe.com/privacy-center/legal](https://stripe.com/privacy-center/legal); - The Rocket Science Group LLC (“Mailchimp”). United States. Email Service Provider. [https://mailchimp.com/gdpr/](https://mailchimp.com/gdpr/). +- Carry Technologies, Inc. dba Hightouch (Hightouch). United States. Data + Integration Provider. + [https://hightouch.com/privacy-policy/](https://hightouch.com/privacy-policy/). Your personal data may be transferred, stored and processed in the European Economic Area (“EEA”), United States (“US”) or any other country in which our