Plugins
Analytics

Entry points

Every import path the package exports, where each may be imported, and what it exports, by release tag.

The package splits its exports by where they run, so a page loads only what it needs and a server module never pulls the admin UI in. Import from the entry that matches where your code runs:

EntryImport it from
@10x-media/analyticsYour Payload config and server code: route handlers, jobs, scripts, Payload's CLI. It loads Payload and no React, admin UI or stylesheet.
@10x-media/analytics/typesAnywhere. Its few runtime values (constants and readErrorCode) load no package, and its types erase.
@10x-media/analytics/attributesAnywhere, the browser and server components included. It loads no package and no stylesheet.
@10x-media/analytics/trackerThe browser. It loads no package and no stylesheet: no React, no Payload, no Node built-ins.
@10x-media/analytics/reactClient components of your site ('use client'). It loads React alone.
@10x-media/analytics/siteServer components of your site, such as its root layout. It loads React and Payload, and no admin module.
@10x-media/analytics/rscServer components of the admin. It loads Payload's admin UI and the stylesheet.
@10x-media/analytics/clientClient components of the admin ('use client'). It loads Payload's admin UI, Next's navigation and the stylesheet.
@10x-media/analytics/i18nAnywhere. It loads no package.
@10x-media/analytics/geoServer code, in your Payload config. It loads no package until a MaxMind lookup needs one.
@10x-media/analytics/nextYour Next.js route handlers. It loads Payload only when a route handler first runs.
@10x-media/analytics/migrationsMigration files, which Payload's CLI runs. It loads no package.
@10x-media/analytics/migrations/drop-legacy-mongoPayload's CLI, as payload migrate:create --file.
@10x-media/analytics/testingTests.
@10x-media/analytics/adapters/nativeYour Payload config and server code. It loads Payload and Node built-ins.
@10x-media/analytics/adapters/plausibleYour Payload config. It loads no package.
@10x-media/analytics/adapters/umamiYour Payload config. It loads no package.
@10x-media/analytics/adapters/ga4Your Payload config. It loads @google-analytics/data only when a read needs it and sdks.ga4 does not hand it over.
@10x-media/analytics/adapters/posthogYour Payload config. It loads no package.
@10x-media/analytics/styles.cssAnywhere that draws BarList or TrendChart outside the admin, where your bundler does not follow the package's own stylesheet imports (Customizing).

Each list below is the entry's whole public surface, as the API reports in the package's repository record it. Stable exports keep their names within a major release; beta ones may change in a minor; internal ones are exported only because Payload's import map names them, so do not import them (Stability).

The adapter contract types

The adapter entries, /next and /testing each also export the types an adapter is written against, the constants among them as types only, all of them stable and all also exported from @10x-media/analytics/types, which exports the constants as values: AdapterContext, AdapterJobs, AdapterLabelArgs, AdapterLabelOption, AdapterRegisterContext, AdapterSchemaContext, AnalyticsAdapter, AnalyticsCapabilities, AnalyticsFilter, AnalyticsQuery, AnalyticsResult, AnalyticsRow, AnalyticsSdks, AnalyticsTaskName, BrowserAmounts, CaptureClientKind, CaptureSlot, CaptureSnippet, CaptureSupport, ConsentPhase, CookielessSupport, CurrencyConverter, DateRange, DIMENSION_KEYS, DimensionKey, FetchInit, FetchLike, FILTER_OPERATORS, FilterOperator, FilterOperatorMap, Ga4Client, Ga4ClientOptions, Ga4ReportResponse, Ga4ReportRow, Ga4Sdk, Goal, GoalMatch, Granularity, HeldSlotMode, HitMode, HitType, IngestHostnameResolver, MaxmindReader, MaxmindSdk, MetricKey, MetricReach, MetricSemantics, MetricValue, MetricValues, OrderSignatureMode, ProxyDescriptor, ProxyRoute, ProxyRouteKind, RateLimitDescriptor, RawEventInput, RouteBase, RoutePaths, ScheduledTask, ServerEventInput, ServerTrack, ServerTrackIdentity, ServerTrackOptions, SlotMode, SlotWithoutConsent, SnippetArgs, SnippetMode, SnippetScript, SourceErrorKind, TASK_NAMES, TrackerGoal, TrackerSlotConfig, TrustedPlatform, VisitorCounting, WithoutConsentLevel.

@10x-media/analytics

Where: Your Payload config and server code: route handlers, jobs, scripts, Payload's CLI. It loads Payload and no React, admin UI or stylesheet.

The plugin, its options and their types, the field factories, goalField and trackGoalAction, server tracking (trackServerEvent, purchase, refund), the server reads and SYSTEM, the provider collection helpers, rebuildDays, the collection slugs and the error builders.

  • Stable values: adapterFromProviderDoc, analytics, ANALYTICS_ERROR_CODES, analyticsError, analyticsFields, analyticsLinkFields, analyticsProviderFields, analyticsRoutes, analyticsStat, analyticsStatRow, analyticsTab, analyticsTabsField, AnalyticsTrackError, CACHE_SLUG, CURRENCY_ATTRIBUTE, DEFAULT_ROUTE_BASE, EVENT_ATTRIBUTE, EVENT_PROP_PREFIX, GOAL_ACTION_TYPE, GOAL_ATTRIBUTE, goalField, GOALS_SLUG, goalSlug, isAdminUser, ITEM_ATTRIBUTE, ITEM_CLICK_EVENT, ITEM_NAME_ATTRIBUTE, itemAttributesFor, keys, MAX_ITEMS_PER_BEACON, parseRetryAfter, PLATFORM_SCOPE, pluralKeys, PROVIDER_IDS, ProviderHttpError, PROVIDERS_SLUG, purchase, PURCHASE_GOAL_SLUG, readErrorCode, readForField, readForWidget, readForWidgetBreakdown, readForWidgetGoals, readForWidgetRealtime, readForWidgetSeries, rebuildDays, refreshProviders, refund, routePaths, signItemRef, signOrderId, STATE_SLUG, SYNC_SLUG, tenantMembership, TIMEFRAME_PRESETS, trackGoalAction, trackServerEvent, VALUE_ATTRIBUTE
  • Stable types: AfterReadAnswer, AfterReadArgs, AfterReadHook, AnalyticsAccessOptions, AnalyticsAttributes, AnalyticsBinding, AnalyticsCacheCollectionOptions, AnalyticsCacheOptions, AnalyticsCaptureOptions, AnalyticsCollectionOptions, AnalyticsConcurrencyOptions, AnalyticsCrossScopeOptions, AnalyticsError, AnalyticsErrorCode, AnalyticsExclusionOptions, AnalyticsFieldsOptions, AnalyticsGoalsCollectionOptions, AnalyticsGoalsOptions, AnalyticsHooksOptions, AnalyticsJobsOptions, AnalyticsLinkFieldsOptions, AnalyticsMetricLabel, AnalyticsMetricLabels, AnalyticsPluginOptions, AnalyticsReadAccess, AnalyticsRevenueOptions, AnalyticsRoutesOptions, AnalyticsScopeOptions, AnalyticsSourceOptions, AnalyticsStatBaseOptions, AnalyticsStatOptions, AnalyticsStatRowOptions, AnalyticsSyncCollectionOptions, AnalyticsSyncOptions, AnalyticsTabOptions, AnalyticsTaskOptions, AnalyticsViewAccess, AnalyticsViewOptions, AnalyticsWarmOptions, AutoCaptureOptions, BindingContext, BindingDoc, BreakdownRow, BuildSecretField, CacheEntry, CacheSetOptions, CacheStore, CapabilityRequirement, CaptureGate, CaptureGateArgs, CaptureSlotOption, CollectionFieldOverride, CollectionOverrides, ConnectionAccess, ConnectionFieldAccess, CrossScopeAccess, CurrencyResolver, DefaultSourceFunction, DefaultSourceRule, ExclusionSitesResolver, FieldBreakdown, FieldBreakdownRow, FieldReadResult, FieldReadStatus, FilterPair, GoalActionDefinition, GoalActionRunArgs, GoalCollectionFieldOverrides, GoalFieldOptions, GoalFieldOverride, GoalRow, GoalSource, HostnameResolver, HostPattern, ItemCaptureOptions, ItemLabels, ItemSignatureMode, OwnSource, PathResolver, PluginOptions, PluralCategory, PluralName, PluralVariant, ProviderCollectionFieldOverrides, ProviderDoc, ProviderFieldOverride, ProviderFieldsOptions, ProviderHostPolicy, ProviderHostsOptions, ProviderId, ProvidersCollectionOptions, ProvidersOptions, ProvidersResolve, ProvidersResolveArgs, QueryError, QueryErrorCode, QueryErrorResponse, QueryResponse, QuerySourceRef, ReadForFieldArgs, ReadForWidgetArgs, ReadForWidgetBreakdownArgs, ReadForWidgetGoalsArgs, ReadForWidgetRealtimeArgs, ReadForWidgetSeriesArgs, ReadNotices, ReadOrigin, ReadRecipe, RealtimePoint, RebuildDaysInput, RebuildDaysReport, RecipeWindow, RefreshProvidersOptions, ReportMode, ReportOption, RevenueItem, RoutesConfigSource, ScopeCallSite, ScopeLabelResolver, ScopeListResolver, ScopeMemberAccess, ScopeResolver, SerializedAnalyticsQuery, SerializedCapabilities, SeriesGranularity, SeriesPoint, ServerPurchaseInput, ServerRefundInput, SingularKey, SourcePolicy, SourcePolicyFunction, SourceRef, StoredSourceRead, SubstitutedSource, TenantMembershipOptions, TimeframePreset, TimezoneResolver, TrackGoalActionOptions, TranslationKey, TranslationsOption, WidgetBreakdownResult, WidgetGoalsResult, WidgetReadResult, WidgetReadStatus, WidgetRealtimeResult, WidgetRealtimeStatus, WidgetSeriesResult, WithoutConsentArgs, WithoutConsentFunction, WithoutConsentOption
  • Beta: AnalyticsComponent, AnalyticsCountryFlags, analyticsDefaultLayout, AnalyticsDefaultLayoutOptions, analyticsDefaultWidgets, AnalyticsWidgetOverride, AnalyticsWidgetOverrides, AnalyticsWidgetsOptions, BUILT_IN_WIDGET_SLUGS, BuiltInWidgetSlug, CONNECTION_PATHS, createGuardedFetch, CustomWidgetDef, GatedScope, GoalsResponse, GuardedFetch, GuardedFetchOptions, ProviderFactoryContext, ReadPrincipal, resolveHostPolicy, SECRET_PATHS, SYSTEM, WidgetFilter, widgetFilters, WireGoal
  • Also: the adapter contract types.

@10x-media/analytics/types

Where: Anywhere. Its few runtime values (constants and readErrorCode) load no package, and its types erase.

The types of every public shape: the adapter contract, the options, the endpoints' requests and answers, the read results, plus the key lists the pickers are built from.

  • Stable values: ANALYTICS_ERROR_CODES, GOAL_ACTION_TYPE, keys, PLATFORM_SCOPE, pluralKeys, readErrorCode, TIMEFRAME_PRESETS, TRAFFIC_CHANNELS
  • Stable types: AdminDigest, AfterReadAnswer, AfterReadArgs, AfterReadHook, AnalyticsAccessOptions, AnalyticsAdapterFactory, AnalyticsBinding, AnalyticsCacheCollectionOptions, AnalyticsCacheOptions, AnalyticsCaptureOptions, AnalyticsCollectionOptions, AnalyticsConcurrencyOptions, AnalyticsCrossScopeOptions, AnalyticsError, AnalyticsErrorCode, AnalyticsExclusionOptions, AnalyticsFieldsOptions, AnalyticsGoalsCollectionOptions, AnalyticsGoalsOptions, AnalyticsHooksOptions, AnalyticsJobsOptions, AnalyticsMetricLabel, AnalyticsMetricLabels, AnalyticsPluginOptions, AnalyticsReadAccess, AnalyticsRevenueOptions, AnalyticsRoutesOptions, AnalyticsScopeOptions, AnalyticsSourceOptions, AnalyticsStatBaseOptions, AnalyticsStatOptions, AnalyticsStatRowOptions, AnalyticsSyncCollectionOptions, AnalyticsSyncOptions, AnalyticsTabOptions, AnalyticsTaskOptions, AnalyticsViewAccess, AnalyticsViewOptions, AnalyticsWarmOptions, AutoCaptureOptions, BindingContext, BindingDoc, CacheEntry, CacheSetOptions, CacheStore, CapabilityRequirement, CaptureGate, CaptureGateArgs, CaptureSlotOption, CollectionFieldOverride, CollectionOverrides, ConnectionAccess, ConnectionFieldAccess, CrossScopeAccess, CurrencyResolver, DefaultSourceFunction, DefaultSourceRule, ExclusionResponse, ExclusionSite, ExclusionSitesResolver, FetchQueryInit, FilterPair, GoalActionDefinition, GoalActionRunArgs, GoalCollectionFieldOverrides, GoalFieldOptions, GoalFieldOverride, HostnameResolver, HostPattern, ItemCaptureOptions, ItemLabels, OwnSource, ParsedQuery, ParseResult, PathResolver, PluralCategory, PluralName, PluralVariant, ProviderCollectionFieldOverrides, ProviderFieldOverride, ProviderHostPolicy, ProviderHostsOptions, ProviderId, ProvidersCollectionOptions, ProvidersOptions, ProvidersResolve, ProvidersResolveArgs, QueryError, QueryErrorCode, QueryErrorResponse, QueryRequest, QueryResponse, QuerySourceRef, ReadOrigin, ReadRecipe, RecipeWindow, RefreshRequest, RefreshResponse, ReportMode, ReportOption, ResolvedAutoCapture, ResolvedItemCapture, ScopeCallSite, ScopeLabelResolver, ScopeListResolver, ScopeMemberAccess, ScopeResolver, SerializedAnalyticsQuery, SerializedCapabilities, SingularKey, SourcePolicy, SourcePolicyFunction, SourceRef, SourcesNotice, SourcesResponse, TimeframePreset, TimezoneResolver, TrackerConfig, TrackerExclusion, TrackerSkip, TrackGoalActionOptions, TrafficChannel, TranslationKey, TranslationsOption, WireSource, WithoutConsentArgs, WithoutConsentFunction, WithoutConsentOption
  • Beta: AnalyticsComponent, AnalyticsCountryFlags, AnalyticsViewClientProps, AnalyticsWidgetOverride, AnalyticsWidgetOverrides, AnalyticsWidgetsOptions, BUILT_IN_WIDGET_SLUGS, BuiltInWidgetSlug, CountryFlagProps, CountryFlags, CustomWidgetDef, HostCountryFlag, ViewEndpoints, ViewGoal, ViewScopes, WidgetView, WidgetViewProps
  • Also: the adapter contract types.

@10x-media/analytics/attributes

Where: Anywhere, the browser and server components included. It loads no package and no stylesheet.

The data-analytics-* attribute names and the helpers that spread them into your markup: goals, content items.

  • Stable values: CURRENCY_ATTRIBUTE, DOWNLOAD_EVENT, EVENT_ATTRIBUTE, EVENT_PROP_PREFIX, eventAttributes, GOAL_ATTRIBUTE, goalAttributes, ITEM_ATTRIBUTE, ITEM_CLICK_EVENT, ITEM_NAME_ATTRIBUTE, itemAttributes, itemRef, MAX_ITEM_REF_LENGTH, MAX_ITEMS_PER_BEACON, OUTBOUND_EVENT, PURCHASE_GOAL_SLUG, SCROLL_EVENT, VALUE_ATTRIBUTE
  • Stable types: AnalyticsAttributes, ItemByDocument, ItemBySignedRef

@10x-media/analytics/tracker

Where: The browser. It loads no package and no stylesheet: no React, no Payload, no Node built-ins.

The browser tracker for a page that boots it without React.

  • Stable values: createTracker, DEFAULT_EXCLUSION_PARAM, DEFAULT_TRACKER_ENDPOINT, EXCLUSION_STORAGE_KEY, initTracker
  • Stable types: AdminDigest, CaptureClientKind, CaptureSlot, CaptureSnippet, ConsentPhase, GateState, GateStatus, GoalMatch, HeldSlotMode, InitTrackerArgs, ItemOptions, LoadScript, ModeSnapshot, PurchaseInput, RefundInput, ResolvedAutoCapture, ResolvedItemCapture, RevenueItem, SlotMode, SlotWithoutConsent, SnippetScript, Tracker, TrackerConfig, TrackerExclusion, TrackerGoal, TrackerOptions, TrackerSkip, TrackerSlotConfig, TrackerWindow, TrackGoalOptions

@10x-media/analytics/react

Where: Client components of your site ('use client'). It loads React alone.

AnalyticsProvider and useAnalytics, the tracker from React (Tracker).

  • Stable values: AnalyticsProvider, useAnalytics
  • Stable types: AdminDigest, AnalyticsApi, AnalyticsCommands, AnalyticsProviderProps, CaptureClientKind, CaptureSlot, CaptureSnippet, ConsentPhase, GateState, GateStatus, GoalMatch, HeldSlotMode, ItemOptions, LoadScript, ModeSnapshot, PurchaseInput, RefundInput, ResolvedAutoCapture, ResolvedItemCapture, RevenueItem, SlotMode, SlotWithoutConsent, SnippetScript, Tracker, TrackerConfig, TrackerExclusion, TrackerGoal, TrackerSkip, TrackerSlotConfig, TrackGoalOptions

@10x-media/analytics/site

Where: Server components of your site, such as its root layout. It loads React and Payload, and no admin module.

AnalyticsScripts and getTrackerConfig, which render the tracker with the request's config (Tracker).

  • Stable values: AnalyticsScripts, getTrackerConfig
  • Stable types: AdminDigest, AnalyticsScriptsProps, CaptureClientKind, CaptureSlot, CaptureSnippet, ConsentPhase, GateState, GateStatus, GoalMatch, HeldSlotMode, ResolvedAutoCapture, ResolvedItemCapture, SlotMode, SlotWithoutConsent, SnippetScript, TrackerConfig, TrackerExclusion, TrackerGoal, TrackerSkip, TrackerSlotConfig

@10x-media/analytics/rsc

Where: Server components of the admin. It loads Payload's admin UI and the stylesheet.

The view and widget server components, the widget card family, the server field wrappers, and the read helpers the package root also exports.

  • Stable values: DIMENSION_KEYS, FILTER_OPERATORS, formatMetricValue, readForField, readForWidget, readForWidgetBreakdown, readForWidgetGoals, readForWidgetRealtime, readForWidgetSeries, TIMEFRAME_PRESETS
  • Stable types: AnalyticsFilter, AnalyticsMetricLabel, AnalyticsMetricLabels, BindingDoc, BreakdownRow, CapabilityRequirement, DateRange, DimensionKey, FieldBreakdown, FieldBreakdownRow, FieldReadResult, FieldReadStatus, FilterOperator, FilterPair, GoalRow, Granularity, MetricFormat, MetricKey, MetricValue, MetricValues, ReadForFieldArgs, ReadForWidgetArgs, ReadForWidgetBreakdownArgs, ReadForWidgetGoalsArgs, ReadForWidgetRealtimeArgs, ReadForWidgetSeriesArgs, ReadNotices, RealtimePoint, ReportMode, ReportOption, SerializedCapabilities, SeriesGranularity, SeriesPoint, SourcesNotice, SourcesResponse, StoredSourceRead, SubstitutedSource, TimeframePreset, WidgetBreakdownResult, WidgetGoalsResult, WidgetReadResult, WidgetReadStatus, WidgetRealtimeResult, WidgetRealtimeStatus, WidgetSeriesResult, WireSource
  • Beta: AnalyticsBreakdownWidget, AnalyticsComponent, AnalyticsCountryFlags, AnalyticsGoalsWidget, AnalyticsMetricWidget, AnalyticsRealtimeWidget, AnalyticsTrendWidget, AnalyticsViewClientProps, AnalyticsWidgetProps, CountryFlagProps, CountryFlags, FilterDimensionSelectFieldProps, FilterDimensionSelectFieldServer, FilterOperatorSelectFieldProps, FilterOperatorSelectFieldServer, FilterValueFieldProps, FilterValueFieldServer, GatedScope, HostCountryFlag, MetricSelectFieldProps, MetricSelectFieldServer, ReadPrincipal, SourceSelectFieldServer, SYSTEM, ViewEndpoints, ViewGoal, ViewScopes, WidgetBody, WidgetCard, WidgetCardProps, WidgetEmpty, WidgetNote, WidgetShimmer, WidgetShimmerKind, WidgetShimmerProps, WidgetSuspense, WidgetValue, WidgetView, WidgetViewProps, WithScopeToken
  • Internal: AnalyticsPanelField, AnalyticsPanelFieldProps, AnalyticsStatField, AnalyticsStatFieldProps, AnalyticsView, AnalyticsViewProps, FallbackLanguage, GoalSelectFieldServer, StatFieldI18n

@10x-media/analytics/client

Where: Client components of the admin ('use client'). It loads Payload's admin UI, Next's navigation and the stylesheet.

The charts, the pickers, fetchQuery and refreshCache, the error readers, and the analytics view's sections for view.Component.

  • Stable values: ANALYTICS_ERROR_CODES, analyticsRoutes, buildQueryUrl, DEFAULT_ROUTE_BASE, DIMENSION_KEYS, fetchQuery, FILTER_OPERATORS, formatMetricValue, QueryFetchError, readErrorCode, readResponseError, refreshCache, routePaths, TIMEFRAME_PRESETS
  • Stable types: AnalyticsError, AnalyticsErrorCode, AnalyticsFilter, AnalyticsQuery, AnalyticsResult, AnalyticsRow, CapabilityRequirement, DateRange, DimensionKey, FetchQueryInit, FilterOperator, FilterPair, GoalSource, Granularity, ItemLabels, MetricFormat, MetricKey, MetricValue, MetricValues, QueryRequest, QueryResponse, QuerySourceRef, ReadNotices, RealtimePoint, RefreshRequest, RefreshResponse, RouteBase, RoutePaths, RoutesConfigSource, SerializedAnalyticsQuery, SerializedCapabilities, SourceErrorKind, SourcesNotice, SourcesResponse, TimeframePreset, VisitorCounting, WireSource
  • Beta: AnalyticsGoals, AnalyticsSources, AnalyticsViewClient, AnalyticsViewClientProps, BarDatum, BarList, BarListHeaders, BarListProps, BreakdownTab, Card, CardProps, ChartDataRow, ChartDataTable, ChartDataTableProps, CountryFlagProps, CountryFlags, DataTable, DataTableColumn, DataTableProps, DataTableRow, DayRange, FilterCapabilities, FilterDimensionSelectFieldProps, FilterOperatorSelectFieldProps, FilterValueField, FilterValueFieldProps, GoalsResponse, HostCountryFlag, MetricCard, MetricCardProps, MetricSelectFieldProps, ProvidersListNotice, QueryState, ReadonlyViewGate, RealtimeCounter, RealtimeCounterProps, RequestFailure, RequestState, SortDirection, Toolbar, TrendChart, TrendChartProps, TrendPoint, useAnalyticsGoals, useAnalyticsSources, useFilterCapabilities, useView, VIEW_LIMITS, ViewAnswers, ViewBreakdowns, ViewContextValue, ViewEndpoints, ViewGoal, ViewGoals, ViewLimit, ViewOverview, ViewQueries, ViewRealtime, ViewRefresh, ViewRoot, ViewRootProps, ViewScopes, ViewState, ViewTrend, WireGoal
  • Deprecated: FilterDimensionSelectField, FilterOperatorSelectField, GoalSelectField, MetricSelectField, SourceSelectField
  • Internal: AnalyticsNavLink, AnalyticsNavLinkProps, DateRangeField, DateRangeFieldComponentProps, DateRangeFieldOptions, DateRangePickerAppearance, GoalAmountField, GoalAmountFieldOptions, GoalAmountFieldProps

@10x-media/analytics/i18n

Where: Anywhere. It loads no package.

The translation keys and the built-in strings (Translations).

  • Stable values: keys, pluralKeys, translations
  • Stable types: AnalyticsTranslationKeys, PluralCategory, PluralName, PluralVariant, SingularKey, TranslationKey, TranslationsOption

@10x-media/analytics/geo

Where: Server code, in your Payload config. It loads no package until a MaxMind lookup needs one.

The geo resolvers for a pipeline of your own.

  • Stable values: composeGeoResolvers, maxmindResolver, noopResolver, platformHeaderResolver
  • Stable types: Geo, GeoResolver, GeoResolverOptions, MaxmindOptions, MaxmindReader, MaxmindSdk, TrustedPlatform

@10x-media/analytics/next

Where: Your Next.js route handlers. It loads Payload only when a route handler first runs.

captureRoute, which relays a vendor through a route handler of your own by the first-party proxy's rules, and ingestRoute and ingestPreflight for beacons in a route of your own. captureRewrites and posthogProxyRewrites stay exported, deprecated, and throw when called: a Next rewrite forwards the visitor's cookies to the vendor.

  • Stable values: captureRoute, ingestPreflight, ingestRoute
  • Stable types: CaptureRewrite, CaptureRewriteMount, CaptureRouteOptions, IngestRouteOptions, PosthogProxyRegion, PosthogProxyRewrite, PosthogProxyRewritesOptions
  • Deprecated: captureRewrites, posthogProxyRewrites
  • Also: the adapter contract types.

@10x-media/analytics/migrations

Where: Migration files, which Payload's CLI runs. It loads no package.

The helpers that remove what earlier releases stored (Upgrading).

  • Stable values: deleteLegacyCache, deleteLegacySalts, dropLegacyNative, LEGACY_MONGO_COLLECTIONS, LEGACY_PRUNE_TASK, LEGACY_SALT_PREFIX, LEGACY_WARM_TASK
  • Stable types: LegacyDropReport

@10x-media/analytics/migrations/drop-legacy-mongo

Where: Payload's CLI, as payload migrate:create --file.

The predefined migration that removes the 1.0.0-beta.11 native storage on MongoDB.

  • Stable values: downSQL, imports, upSQL

@10x-media/analytics/testing

Where: Tests.

memoryAdapter, an in-memory adapter, and settleAnalytics, which waits for the plugin's background work (Adapter contract).

  • Stable values: memoryAdapter, settleAnalytics
  • Stable types: MemoryAnalyticsAdapter, MemoryEvent
  • Also: the adapter contract types.

@10x-media/analytics/adapters/native

Where: Your Payload config and server code. It loads Payload and Node built-ins.

The native engine: native() and its options, isBot, the slugs and the maintenance task's name and input.

  • Stable values: AGGREGATES_SLUG, HITS_SLUG, isBot, MAINTAIN_TASK_SLUG, native, SESSION_DIMENSIONS
  • Stable types: AnalyticsCollectionOptions, BotFilter, CapKey, CapsOption, CardinalityCaps, CollectionOverrides, EventHostnameResolver, Geo, GeoResolver, GeoResolverOptions, HostnameOption, ItemSignatureMode, MaintainTaskInput, NativeAdapter, NativeCollections, NativeOptions, NativeRetention, NativeSqlite, NativeToday, NativeWithoutConsent, RebuildDaysInput, RebuildDaysReport, SessionDimension, SqliteThread, WriteBufferLimits, WriteBufferOption
  • Also: the adapter contract types.

@10x-media/analytics/adapters/plausible

Where: Your Payload config. It loads no package.

Plausible.

@10x-media/analytics/adapters/umami

Where: Your Payload config. It loads no package.

Umami.

@10x-media/analytics/adapters/ga4

Where: Your Payload config. It loads @google-analytics/data only when a read needs it and sdks.ga4 does not hand it over.

GA4.

@10x-media/analytics/adapters/posthog

Where: Your Payload config. It loads no package.

PostHog.

On this page