From 7a5b0c7ac40c85f5597e9afe63ac67b86c9eaf77 Mon Sep 17 00:00:00 2001 From: giuseppe-coinbase <138020133+giuseppe-coinbase@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:41:23 -0500 Subject: [PATCH] Renamed library to client-analytics (#15) Signed-off-by: Giuseppe Macri --- .changeset/perfect-scissors-call.md | 4 ++-- README.md | 10 +++++----- docs/documentation.md | 2 +- docs/index.md | 10 +++++----- package.json | 12 ++++++------ src/storage/config.test.ts | 6 +++--- src/storage/identity.test.ts | 4 ++-- src/trackEvent.test.ts | 4 ++-- src/trackMetric.test.ts | 4 ++-- src/trackPageView.ts | 2 +- src/utils/enhancers.test.ts | 4 ++-- src/utils/isPlatform.test.ts | 6 +++--- src/utils/perfume.test.ts | 4 ++-- vite.config.ts | 4 ++-- 14 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.changeset/perfect-scissors-call.md b/.changeset/perfect-scissors-call.md index ca53008..54292b1 100644 --- a/.changeset/perfect-scissors-call.md +++ b/.changeset/perfect-scissors-call.md @@ -1,5 +1,5 @@ --- -'open-analytics': patch +'client-analytics': patch --- -release open-analytics +release client-analytics diff --git a/README.md b/README.md index c450c80..908c07d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Open Analytics +# Client Analytics With this Open Source Analytics Library, we want to provide all developers with the ability to move to an auto-instrumented event world where we can count on data being produced with standardized fields. @@ -6,10 +6,10 @@ For a deeper look into the Library, please visit our documentation. ## Installation -You can install the Open Analytics package using yarn (or npm): +You can install Client Analytics package using yarn (or npm): ```bash -yarn add open-analytics +yarn add client-analytics ``` ## Features @@ -20,11 +20,11 @@ yarn add open-analytics - **Web Vitals Monitoring**: Specifically designed to help you track and analyze Core Web Vitals, including Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS). -- **Customizable Configuration**: Configure the Open Analytics package to suit your application's specific tracking and reporting needs. Customize event types, tracked metrics, and reporting destinations. +- **Customizable Configuration**: Configure the Client Analytics package to suit your application's specific tracking and reporting needs. Customize event types, tracked metrics, and reporting destinations. - **Data Privacy**: The library does not track any user information by default. you can choose to enable session tracking to associate events with a specific user session. -- **Intuitive API**: Open Analytics offers a user-friendly API that integrates seamlessly into your application codebase. No complex setup required. +- **Intuitive API**: Client Analytics offers a user-friendly API that integrates seamlessly into your application codebase. No complex setup required. ## Contributing diff --git a/docs/documentation.md b/docs/documentation.md index c277309..b9eb168 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -1,7 +1,7 @@ --- layout: default title: Documentation -description: This contains a more in-depth look at the Open Analytics Library. +description: This contains a more in-depth look at the Client Analytics Library. --- ## Welcome to the documentation page! diff --git a/docs/index.md b/docs/index.md index 85868f3..8c5b13f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ ![coinbase-logo-image](./img/CB-logo.png) -# Open Analytics +# Client Analytics With this Open Source Analytics Library, we want to provide all developers with the ability to move to an auto-instrumented event world where we can count on data being produced with standardized fields. @@ -8,10 +8,10 @@ For a deeper look into the Library, please visit our [documentation](./documenta # Installation -You can install the Open Analytics package using npm: +You can install the Client Analytics package using npm: ```bash -yarn add open-analytics +yarn add client-analytics ``` ## Features @@ -22,11 +22,11 @@ yarn add open-analytics - **Web Vitals Monitoring**: Specifically designed to help you track and analyze Core Web Vitals, including Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS). -- **Customizable Configuration**: Configure the Open Analytics package to suit your application's specific tracking and reporting needs. Customize event types, tracked metrics, and reporting destinations. +- **Customizable Configuration**: Configure the Client Analytics package to suit your application's specific tracking and reporting needs. Customize event types, tracked metrics, and reporting destinations. - **Data Privacy**: The library does not track any user information by default. you can choose to enable session tracking to associate events with a specific user session. -- **Intuitive API**: Open Analytics offers a user-friendly API that integrates seamlessly into your application codebase. No complex setup required. +- **Intuitive API**: Client Analytics offers a user-friendly API that integrates seamlessly into your application codebase. No complex setup required. ## Contributing diff --git a/package.json b/package.json index 7d33794..d53f1be 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { - "name": "open-analytics", - "version": "0.0.0", + "name": "client-analytics", + "version": "0.0.1", "type": "module", - "main": "./dist/open-analytics.umd.cjs", - "module": "./dist/open-analytics.js", + "main": "./dist/client-analytics.umd.cjs", + "module": "./dist/client-analytics.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/open-analytics.js", - "require": "./dist/open-analytics.umd.cjs" + "import": "./dist/client-analytics.js", + "require": "./dist/client-analytics.umd.cjs" } }, "scripts": { diff --git a/src/storage/config.test.ts b/src/storage/config.test.ts index 35c1c78..c8683dd 100644 --- a/src/storage/config.test.ts +++ b/src/storage/config.test.ts @@ -28,7 +28,7 @@ describe('Config', () => { eventPath: '/custom-events', metricPath: '/custom-metrics', onError: expect.any(Function), - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', disabled: false, }); @@ -40,7 +40,7 @@ describe('Config', () => { eventPath: '/custom-events', metricPath: '/custom-metrics', onError: expect.any(Function), - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', disabled: false, isAlwaysAuthed: false, version: null, @@ -66,7 +66,7 @@ describe('Config', () => { isDebug: true, eventPath: '/custom-events', metricPath: '/custom-metrics', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', disabled: false, reset: () => Object.assign(getConfig(), DEFAULT_CONFIG), onError: () => undefined, diff --git a/src/storage/identity.test.ts b/src/storage/identity.test.ts index abec46d..404b26e 100644 --- a/src/storage/identity.test.ts +++ b/src/storage/identity.test.ts @@ -23,7 +23,7 @@ const resetState = () => { setConfig({ platform: 'web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }) ); }; @@ -223,7 +223,7 @@ describe('identity', () => { setConfig({ platform: 'mobile_web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }) ); expect(getPlatformValue()).toBe('mobile_web'); diff --git a/src/trackEvent.test.ts b/src/trackEvent.test.ts index de3389f..3c7759d 100644 --- a/src/trackEvent.test.ts +++ b/src/trackEvent.test.ts @@ -18,7 +18,7 @@ describe('trackEvent', () => { const config = setConfig({ platform: 'web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); }); @@ -58,7 +58,7 @@ describe('trackEvent', () => { const config = setConfig({ platform: 'unknown', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); const event = await trackEvent({ diff --git a/src/trackMetric.test.ts b/src/trackMetric.test.ts index 0d4e656..716d3fc 100644 --- a/src/trackMetric.test.ts +++ b/src/trackMetric.test.ts @@ -9,7 +9,7 @@ describe('trackMetric', () => { const config = setConfig({ platform: 'web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); }); @@ -45,7 +45,7 @@ describe('trackMetric', () => { const config = setConfig({ platform: 'unknown', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); const metric = await trackMetric({ diff --git a/src/trackPageView.ts b/src/trackPageView.ts index 113660c..2f24d79 100644 --- a/src/trackPageView.ts +++ b/src/trackPageView.ts @@ -1,5 +1,5 @@ /** - * This entire file will eventually be moved to the React open-analytics package + * This entire file will eventually be moved to the React client-analytics package */ import { RouteComponentProps } from 'react-router'; diff --git a/src/utils/enhancers.test.ts b/src/utils/enhancers.test.ts index 2aef3c0..bc96358 100644 --- a/src/utils/enhancers.test.ts +++ b/src/utils/enhancers.test.ts @@ -307,7 +307,7 @@ describe('enhance', () => { const config = setConfig({ platform: 'web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); @@ -332,7 +332,7 @@ describe('enhance', () => { const config = setConfig({ platform: 'web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(identity, { locale: 'test' }); diff --git a/src/utils/isPlatform.test.ts b/src/utils/isPlatform.test.ts index 470cc25..88de208 100644 --- a/src/utils/isPlatform.test.ts +++ b/src/utils/isPlatform.test.ts @@ -16,7 +16,7 @@ describe('isPlatform()', () => { disabled: false, isAlwaysAuthed: false, version: null, - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', // TODO: find better solution to handle reset reset: expect.any(Function), }); @@ -33,7 +33,7 @@ describe('isPlatform()', () => { const config = setConfig({ platform: 'mobile_web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); expect(isMobileWeb()).toBe(true); @@ -50,7 +50,7 @@ describe('isPlatform()', () => { const config = setConfig({ platform: 'mobile_web', projectName: 'testing', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', }); Object.assign(getStorage().config, config); expect(isMobileWeb()).toBe(false); diff --git a/src/utils/perfume.test.ts b/src/utils/perfume.test.ts index d3f9f6a..cce6678 100644 --- a/src/utils/perfume.test.ts +++ b/src/utils/perfume.test.ts @@ -39,7 +39,7 @@ const DEFAULT_TEST_STORAGE_CONFIG = { isDebug: true, eventPath: '/custom-events', metricPath: '/custom-metrics', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', disabled: false, reset: () => Object.assign(getConfig(), DEFAULT_CONFIG), onError: () => undefined, @@ -63,7 +63,7 @@ describe('perfume', () => { isDebug: true, eventPath: '/custom-events', metricPath: '/custom-metrics', - apiEndpoint: 'https://open.analytics', + apiEndpoint: 'https://client.analytics', disabled: false, reset: () => Object.assign(getConfig(), DEFAULT_CONFIG), onError: () => undefined, diff --git a/vite.config.ts b/vite.config.ts index a3f26e2..32c87a1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,8 +10,8 @@ export default defineConfig({ build: { lib: { entry: resolve(__dirname, 'src/index.ts'), - name: 'open-analytics', - fileName: 'open-analytics', + name: 'client-analytics', + fileName: 'client-analytics', }, }, plugins: [dts()],