Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
analytics-client
Advanced tools
Convenient builders to compose analytics tools
Client part of analytics services used at balena.
npm install --save analytics-client
URL query parameters tool.
import { AnalyticsUrlParams } from 'analytics-client';
const urlParamsHandler = new AnalyticsUrlParams(mixpanel);
urlParamsHandler.consumeUrlParameters(window.location.search);
const signupUrl = '/signup?' + urlParamsHandler.getDeviceIdsQueryString();
UI experiments definition.
import { createClient, LocalExperiment } from 'analytics-client';
const client = createClient({projectName: 'my-project'});
type Variation = 'modal' | 'sidebar-left' | 'sidebar-right';
const experiment = new LocalExperiment<Variation>('WelcomeUI', client)
.define('modal', 50)
.define('sidebar-left', 25)
.define('sidebar-right', 25);
switch (experiment.engage(client.deviceId())) {
case 'modal':
showModal();
break;
// ...
}
Tracking a page view.
import { createClient, WebTracker, createWebTracker } from 'analytics-client';
const client = createClient({ projectName: 'my-project' });
createWebTracker(client).trackPageView();
Load the script from unpkg CDN (replacing {version}
with an actual version you need to use):
<script src="https://unpkg.com/analytics-client@{version}/dist/bundle.js"></script>
Then use the analyticsClient
variable:
const urlParamsHandler = new analyticsClient.AnalyticsUrlParams();
FAQs
Convenient builders to compose analytics tools
The npm package analytics-client receives a total of 2,758 weekly downloads. As such, analytics-client popularity was classified as popular.
We found that analytics-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.