
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@wix/analytics
Advanced tools
A type-safe Wix Analytics SDK for tracking events in Wix applications. This package provides a browser-only interface that proxies to the global window.wixAnalytics.trackEvent method with full TypeScript support for all standard Wix Analytics events.
npm install @wix/analytics
import { trackEvent } from "@wix/analytics";
// Track standard Wix Analytics events with type safety
trackEvent("AddToCart", {
name: "Example Product",
price: 29.99,
currency: "USD",
category: "Electronics",
quantity: 1,
});
// Track events without parameters
trackEvent("CompleteRegistration");
// Track custom events
trackEvent("custom_button_click", {
eventCategory: "user_interaction",
eventAction: "click",
eventLabel: "header_cta",
});
window.wixAnalytics is availabletrackEvent(eventName, eventData?)Track a Wix Analytics event with type-safe event data.
Parameters:
eventName - Name of the event to track (supports standard Wix events and custom events)eventData - Event data typed according to the event name (optional for some events)The package provides full TypeScript support for all standard Wix Analytics events:
// Add product to cart
trackEvent("AddToCart", {
name: "Product Name",
price: 29.99,
currency: "USD",
category: "Electronics",
quantity: 1,
});
// Track purchase
trackEvent("Purchase", {
id: "order_123",
revenue: 99.99,
contents: [
{
name: "Product 1",
price: 49.99,
quantity: 2,
},
],
});
// Initiate checkout
trackEvent("InitiateCheckout", {
contents: [
{
name: "Product Name",
price: 29.99,
quantity: 1,
},
],
});
// Click on product
trackEvent("ClickProduct", {
name: "Product Name",
category: "Electronics",
position: "1",
});
// View content
trackEvent("ViewContent", {
name: "Product Name",
category: "Electronics",
price: 29.99,
});
// Lead generation
trackEvent("Lead", {
category: "contact",
action: "form_submit",
});
// User registration (no parameters needed)
trackEvent("CompleteRegistration");
// Schedule appointment (no parameters needed)
trackEvent("Schedule");
// Start payment process
trackEvent("StartPayment", {
option: "PayPal",
});
// Add payment info
trackEvent("AddPaymentInfo", {
option: "Visa",
});
// Custom events with flexible parameters
trackEvent("custom_event_name", {
eventCategory: "user_interaction",
eventAction: "click",
eventLabel: "navigation_menu",
eventValue: 1,
});
The package exports comprehensive TypeScript types for all events:
import type {
WixAnalyticsEventName,
WixAnalyticsEventData,
TrackingParametersAddToCartEvent,
TrackingParametersPurchaseEvent,
TrackingParametersCustomEvent,
} from "@wix/analytics";
// Type-safe event data
const addToCartData: TrackingParametersAddToCartEvent = {
name: "Product Name",
price: 29.99,
currency: "USD",
};
trackEvent("AddToCart", addToCartData);
This package is designed to work in browser environments only where the Wix Analytics global object is available. It requires:
window.wixAnalytics.trackEvent method to be availableIf these requirements are not met, the package will log warnings and gracefully handle the missing dependencies.
The package includes built-in error handling:
window.wixAnalytics.trackEvent is not availableMIT
FAQs
Wix Analytics SDK package for event tracking
The npm package @wix/analytics receives a total of 344 weekly downloads. As such, @wix/analytics popularity was classified as not popular.
We found that @wix/analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 30 open source maintainers 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.