Skip to content

Commit

Permalink
Renamed library to client-analytics (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Macri <[email protected]>
  • Loading branch information
giuseppe-coinbase authored Nov 28, 2023
1 parent 553c951 commit 7a5b0c7
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .changeset/perfect-scissors-call.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'open-analytics': patch
'client-analytics': patch
---

release open-analytics
release client-analytics
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 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.

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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/documentation.md
Original file line number Diff line number Diff line change
@@ -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!
Expand Down
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
![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.

For a deeper look into the Library, please visit our [documentation](./documentation.html).

# 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
Expand All @@ -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

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/storage/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand All @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/storage/identity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const resetState = () => {
setConfig({
platform: 'web',
projectName: 'testing',
apiEndpoint: 'https://open.analytics',
apiEndpoint: 'https://client.analytics',
})
);
};
Expand Down Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions src/trackEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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({
Expand Down
4 changes: 2 additions & 2 deletions src/trackMetric.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/trackPageView.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/utils/enhancers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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' });
Expand Down
6 changes: 3 additions & 3 deletions src/utils/isPlatform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
Expand All @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/perfume.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand Down

0 comments on commit 7a5b0c7

Please sign in to comment.