> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: analytics.trackEvent(eventName: any, eventData: WixAnalyticsEventData) # Method Link: https://dev.wix.com/docs/sdk/host-modules/site/analytics/track-event.md # Method Description: Reports a [standard](https://dev.wix.com/docs/sdk/host-modules/site/events/about-analytics-events.md) or custom analytics event to external analytics tools connected to a site, such as Google Analytics, Facebook Pixel, or tools set up with Google Tag Manager. > **Note:** Wix business solutions, such as Wix Stores or Wix Events, trigger standard events when the corresponding user action occurs on the site. However, standard events aren't automatically forwarded to external analytics platforms. Call `trackEvent()` to report them to connected platforms. Learn more about: + [Marketing integrations](https://support.wix.com/en/article/about-marketing-integrations) + [Connecting a Facebook Pixel to your wix site](https://support.wix.com/en/article/connecting-a-facebook-pixel-and-the-conversions-api-to-your-wix-site-7351813) + [Connecting a Google Analytics property to your Wix site](https://support.wix.com/en/article/tracking-events-on-your-wix-site-with-a-google-analytics-property) + [Connecting your Google Tag Manager account to your Wix site](https://support.wix.com/en/article/connecting-your-google-tag-manager-account-to-your-wix-site) # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Report a standard event that doesn't have event data ```javascript ```typescript import { analytics } from '@wix/site'; analytics.trackEvent("Lead"); ``` ``` ## Report a standard event with event data ```javascript ```typescript import { analytics } from '@wix/site'; analytics.trackEvent("ViewContent", { origin: "My Sportswear Store", id: "P12345", sku: 20, name: "Really Fast Running Shoes", price: 120, currency: "USD", category: "Apparel/Shoes", brand: "SomeBrand", variant: "Black", list: "Product Gallery", position: 1 } ); ``` ``` ## Report a custom event ```javascript ```typescript import { analytics } from '@wix/site'; analytics.trackEvent("CustomEvent", { eventCategory: "Sporting Goods", eventAction: "FrequentShopper", eventLabel: "November", eventValue: 1, purchase_count: 8, average_purchase_value: 245.24, currency: "USD", shipping_info: { method: "standard overnight", note: "leave at the front door" } } ); ``` ```