Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix lints

Blue Mousec7386385e8ba
diff --git a/docs/content/docs/script-reference.mdx b/docs/content/docs/script-reference.mdx
index 28bb1929f..310eb6480 100644
--- a/docs/content/docs/script-reference.mdx
+++ b/docs/content/docs/script-reference.mdx
@@ -283,13 +283,13 @@ For npm installs, Swetrix dynamically imports the installed `rrweb` package only
| Name | Description | Default value |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| privacy | Controls how much page content is masked. Use `total` to mask all text and inputs and block media/canvas content, `normal` to mask all inputs, or `none` to only force password inputs to stay masked unless you add your own `rrweb` masking options. | `total` |
-| maskAllText | Masks all non-input text with asterisks. Defaults to `true` when `privacy` is `total`, and `false` for `normal` or `none`. | privacy-based |
+| maskAllText | Masks all non-input text with asterisks. Defaults to `true` when `privacy` is `total`, and `false` for `normal` or `none`. | privacy-based |
| rrweb | Advanced recorder options passed to `rrweb.record()`. If you provide an `emit` callback, Swetrix will call it and still upload replay events. | `undefined` |
| flushIntervalMs | How often replay events are uploaded while recording. | `5000` |
| maxEventsPerChunk | The maximum number of replay events to batch before Swetrix uploads a chunk immediately. | `100` |
| maxBytesPerChunk | The approximate maximum byte size to buffer before Swetrix uploads a chunk immediately. | `524288` |
| maxBytesPerEvent | Drops a single replay event if it is larger than this many bytes. This protects the visitor's browser and your replay storage from unusually large snapshots. | `5242880` |
-| recordIframes | Allows iframe elements to be captured. Iframes are blocked by default to reduce replay size and avoid recording embedded third-party content. | `false` |
+| recordIframes | Allows iframe elements to be captured. Iframes are blocked by default to reduce replay size and avoid recording embedded third-party content. | `false` |
To mask text while keeping media less restricted than `total` privacy, combine `normal` privacy with `maskAllText`:
diff --git a/web/app/lib/pricing/catalog.ts b/web/app/lib/pricing/catalog.ts
index 1a16a3b71..aebb5f8bb 100644
--- a/web/app/lib/pricing/catalog.ts
+++ b/web/app/lib/pricing/catalog.ts
@@ -111,7 +111,6 @@ export const EVENT_TIERS = {
>
export const EVENT_TIER_CODES = Object.keys(EVENT_TIERS) as EventTierCode[]
-export const SELF_SERVE_PLAN_TYPES: PlanTypeCode[] = ['standard', 'plus']
const UNPAID_PLAN_CODES = new Set(['none', 'free', 'trial'])
const isProduction = () =>
@@ -318,75 +317,6 @@ const PLAN_PRICES: PlanPriceCatalog = {
enterprise: {},
}
-export const PLAN_ENTITLEMENTS = {
- standard: {
- websites: 10,
- teamMembers: 10,
- organisations: 3,
- apiRateLimitPerHour: 300,
- sessionReplaysIncluded: 0,
- featureKeys: [
- 'pricing.benefits.eventsAndGoals',
- 'pricing.benefits.funnels',
- 'pricing.benefits.sessionUserProfileAnalysis',
- 'pricing.benefits.errorTracking',
- 'pricing.benefits.advancedBotDetection',
- 'pricing.benefits.adBlockerBypass',
- 'pricing.benefits.emailReports',
- 'pricing.benefits.recaptchaAlternative',
- 'pricing.benefits.restfulApiSdks',
- 'pricing.benefits.googleAnalyticsImport',
- 'pricing.benefits.humanSupport',
- ],
- },
- plus: {
- websites: 100,
- teamMembers: 25,
- organisations: 10,
- apiRateLimitPerHour: 6000,
- sessionReplaysIncluded: 'byEventTier',
- sessionReplayQuota: {
- '100k': 5000,
- '200k': 10000,
- '500k': 25000,
- '1m': 50000,
- '2m': 100000,
- '5m': 250000,
- '10m': 500000,
- '15m': 750000,
- '20m': 1000000,
- '30m': 1500000,
- '40m': 2000000,
- '50m': 2500000,
- },
- featureKeys: [
- 'pricing.benefits.sessionReplays',
- 'pricing.benefits.featureFlags',
- 'pricing.benefits.abTesting',
- 'pricing.benefits.twentyXHigherApiRateLimits',
- 'pricing.benefits.prioritySupport',
- ],
- },
- enterprise: {
- websites: 'custom',
- teamMembers: 'custom',
- organisations: 'custom',
- apiRateLimitPerHour: 'custom',
- sessionReplaysIncluded: 'custom',
- featureKeys: [
- 'pricing.benefits.dedicatedAccountManager',
- 'pricing.benefits.customEventLimits',
- 'pricing.benefits.customFeatures',
- 'pricing.benefits.onPremise',
- 'pricing.benefits.dedicatedInstance',
- 'pricing.benefits.ssoSaml',
- 'pricing.benefits.personalOnboarding',
- 'pricing.benefits.manualInvoicing',
- 'pricing.benefits.sla',
- ],
- },
-} as const
-
const LEGACY_PLAN_LIMITS = {
none: {
index: 0,
@@ -575,42 +505,3 @@ export const getPlanPrice = (
currencyCode: CurrencyCode,
) =>
PLAN_PRICES[planType]?.[eventTier]?.[billingInterval]?.[currencyCode] ?? null
-
-export const getPlanMonthlyPrice = (
- planType: PlanTypeCode,
- eventTier: EventTierCode,
- billingInterval: BillingInterval,
- currencyCode: CurrencyCode,
-) => {
- const planPrice = getPlanPrice(
- planType,
- eventTier,
- billingInterval,
- currencyCode,
- )
-
- if (!planPrice) return null
- return billingInterval === 'yearly'
- ? Math.round((planPrice.amount / 12) * 100) / 100
- : planPrice.amount
-}
-
-export const getIncludedSessionReplays = (
- planType: PlanTypeCode,
- eventTier: EventTierCode,
-) => {
- const entitlements = PLAN_ENTITLEMENTS[planType]
-
- if (typeof entitlements.sessionReplaysIncluded === 'number') {
- return entitlements.sessionReplaysIncluded
- }
-
- if (
- entitlements.sessionReplaysIncluded === 'byEventTier' &&
- 'sessionReplayQuota' in entitlements
- ) {
- return entitlements.sessionReplayQuota[eventTier] ?? 0
- }
-
- return entitlements.sessionReplaysIncluded
-}