Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(growth): advertise Desktop, Slack, GitHub, Self-driving in sidebar (#93720)

Rafael Audibert5b33f5600374
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 02308cb0f8c2..711f9237a106 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -1437,9 +1437,9 @@ snapshots:
components-mcp-use-case-card--surveys-create--light:
hash: v1.k794b7964.693a3cba67de29bb7ecea8b07f3ae05b0201c2785fa2f2d4975e481b6fdc349e.ROQjP-mA4zsLzJifJv9uIKLgwuM0h84NwoFZJ90rSyc
components-navpanelproductpush--all-products--dark:
- hash: v1.k794b7964.9ca67b789c62aceb0bbfdbec3f3f89d764359c5669de63e5987e1d5e9afb9733.v9gXYiH3-wMeduwyBCs1XeaYm9aOsbuscn-lgLMfG1o
+ hash: v1.k794b7964.8b460276d45041350cc96fb98ec1d5025e48560fd8ff6ab328421b4851b1bd41.GGe6E02b9LwL1ZxHajhFXlzABp2sgjlX7RqShO92yQI
components-navpanelproductpush--all-products--light:
- hash: v1.k794b7964.53d9b8a8fafe9c92f4f8562c4d31e992a9155313cf4f3bd426f64cc463446fd9.DdrGrHXga433cyEFNePUtgoEz8s4HZBG9lDrmmNeZlg
+ hash: v1.k794b7964.de58f637861157c0e4a3281d5f56da9447019265aea1c897d73d367e22edc690.ES4hg06YNGISifFv2dvUL8uQKXix83i31w8fuEjGhgo
components-navpanelproductpush--default-fallback--dark:
hash: v1.k794b7964.020f807f2d17fdf515b84c8800c37e0b6d8b0bda09421fbe1f0d3bcf9aeb23d4.C0OD2Gur0abSVWhBC5aarFDYTYRrudc-F6CjqvjhJ5o
components-navpanelproductpush--default-fallback--light:
diff --git a/frontend/src/layout/navigation/projectNoticeLogic.tsx b/frontend/src/layout/navigation/projectNoticeLogic.tsx
index 869430224477..ac8489027973 100644
--- a/frontend/src/layout/navigation/projectNoticeLogic.tsx
+++ b/frontend/src/layout/navigation/projectNoticeLogic.tsx
@@ -72,6 +72,9 @@ function ProvisionedProductStrip(): JSX.Element {
{FLAGSHIP_PRODUCT_KEYS.map((productKey) => {
const { Hoggie } = getProductPushDisplay(productKey)
const meta = brandingForProduct(productKey)
+ if (!Hoggie) {
+ return null
+ }
return (
<Link
key={productKey}
diff --git a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.stories.tsx b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.stories.tsx
index 21df55422c90..c6a605e6e620 100644
--- a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.stories.tsx
+++ b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.stories.tsx
@@ -52,7 +52,7 @@ export const AllProducts: Story = {
<PushCard
key={productKey}
productKey={productKey}
- title={humanizeProductKey(productKey)}
+ title={display.label ?? humanizeProductKey(productKey)}
display={display}
/>
)
diff --git a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.tsx b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.tsx
index 230e87534e1a..bf9a1a0a3a41 100644
--- a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.tsx
+++ b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelProductPushAd.tsx
@@ -2,6 +2,8 @@ import { BindLogic, useActions, useValues } from 'kea'
import { Link } from '@posthog/lemon-ui'
+import { isExternalLink } from 'lib/utils/url'
+
import type { ProductPushCampaignApi } from 'products/growth/frontend/generated/api.schemas'
import { AdvertisementCard } from './navPanelAdShared'
@@ -10,19 +12,24 @@ import { navPanelProductPushAdLogic } from './navPanelProductPushAdLogic'
export function NavPanelProductPushAd({ campaign }: { campaign: ProductPushCampaignApi }): JSX.Element | null {
const logic = navPanelProductPushAdLogic({ campaign })
- const { productInfo, display, shouldRender } = useValues(logic)
+ const { display, shouldRender, destination, label } = useValues(logic)
const { reportAdClicked, reportAdDismissed } = useActions(logic)
- if (!shouldRender || !productInfo) {
+ if (!shouldRender || !destination) {
return null
}
return (
<div className="w-full">
- <Link to={productInfo.href} className="text-primary" onClick={() => reportAdClicked()}>
+ <Link
+ to={destination}
+ target={isExternalLink(destination) ? '_blank' : undefined}
+ className="text-primary"
+ onClick={() => reportAdClicked()}
+ >
<BindLogic logic={navPanelAdvertisementLogic} props={{ dismissKey: `product-push-${campaign.id}` }}>
<AdvertisementCard
- title={productInfo.displayLabel ?? productInfo.path}
+ title={label ?? ''}
text={campaign.reason_text || display.tagline}
hero={display}
onClose={() => reportAdDismissed()}
diff --git a/frontend/src/lib/components/NavPanelAdvertisement/navPanelAdShared.tsx b/frontend/src/lib/components/NavPanelAdvertisement/navPanelAdShared.tsx
index f9d943c6732a..d3555aad5661 100644
--- a/frontend/src/lib/components/NavPanelAdvertisement/navPanelAdShared.tsx
+++ b/frontend/src/lib/components/NavPanelAdvertisement/navPanelAdShared.tsx
@@ -58,14 +58,26 @@ export interface HoggieOffset {
}
export interface ProductPushDisplay {
- /** Hoggie illustration shown at the bottom of the promo card (a PNG, via `pngHoggie`) */
- Hoggie: React.ComponentType<AssetSvgProps>
+ /** Hoggie illustration shown at the bottom of the promo card (a PNG, via `pngHoggie`). Mutually
+ * exclusive with `Icon` — a card shows one or the other. */
+ Hoggie?: React.ComponentType<AssetSvgProps>
+ /** Pre-rendered brand logo shown instead of a Hoggie, for surfaces that aren't catalog products.
+ * The card positions and rotates it; the element carries its own size and color. */
+ Icon?: JSX.Element
+ /** Soft purple glow behind `Icon`, echoing the AI surfaces' sidebar treatment. */
+ iconBackdrop?: boolean
+ /** Render `Icon` upright instead of the default slight rotation (the PostHog logomark reads wrong tilted). */
+ iconUpright?: boolean
/** Product brand color, used for the title and - mixed down - its highlight */
accentColor: string
/** Default promo copy, used when the campaign has no custom reason text */
tagline: string
/** Overrides the default framing of `Hoggie`, for illustrations that sit off-balance in their own bounds */
hoggieOffset?: HoggieOffset
+ /** Card title for a growth surface, which has no product catalog entry to resolve a name from */
+ label?: string
+ /** Destination the card links to. Absolute URL for external surfaces, in-app path otherwise. */
+ href?: string
}
const DEFAULT_HOGGIE_OFFSET: Required<HoggieOffset> = { x: 50, y: 22 }
@@ -108,16 +120,29 @@ export function ProductHogHero({
{topRight}
</div>
<p className="mb-0 text-secondary">{text}</p>
- {/* Pulled out of the card's horizontal padding so `x` is a share of the full card width */}
- <div className="relative -mx-2 -mt-1 h-32">
- {/* Oversized rather than nudged down, so the part `y` hides below the edge does not
- open an equal gap above the hog. */}
- <hero.Hoggie
- className="absolute top-0 w-auto max-w-none"
- style={{ left: `${x}%`, height: `${100 / (1 - y / 100)}%`, transform: 'translateX(-50%)' }}
- aria-hidden="true"
- />
- </div>
+ {hero.Icon ? (
+ // A surface has no hoggie: show its own logo toward the bottom-right, tilted by
+ // default (uprighted for marks that read wrong at an angle, e.g. the PostHog logo).
+ <div className="relative -mx-2 -mt-1 h-24 overflow-hidden" aria-hidden="true">
+ <div className={`absolute bottom-3 right-4 ${hero.iconUpright ? '' : 'rotate-[14deg]'}`}>
+ {hero.iconBackdrop ? (
+ <div className="absolute inset-0 scale-75 rounded-full bg-[var(--color-purple-200)] opacity-70 blur-lg" />
+ ) : null}
+ <div className="relative">{hero.Icon}</div>
+ </div>
+ </div>
+ ) : hero.Hoggie ? (
+ // Pulled out of the card's horizontal padding so `x` is a share of the full card width
+ <div className="relative -mx-2 -mt-1 h-32">
+ {/* Oversized rather than nudged down, so the part `y` hides below the edge does not
+ open an equal gap above the hog. */}
+ <hero.Hoggie
+ className="absolute top-0 w-auto max-w-none"
+ style={{ left: `${x}%`, height: `${100 / (1 - y / 100)}%`, transform: 'translateX(-50%)' }}
+ aria-hidden="true"
+ />
+ </div>
+ ) : null}
</div>
)
}
diff --git a/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushAdLogic.ts b/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushAdLogic.ts
index d96867d76caa..d11975a5a6ae 100644
--- a/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushAdLogic.ts
+++ b/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushAdLogic.ts
@@ -26,8 +26,10 @@ const dismissKey = (campaign: ProductPushCampaignApi): string => `product-push-$
export interface navPanelProductPushAdLogicValues {
featureFlags: FeatureFlagsSet // featureFlagLogic
hidden: boolean // navPanelAdvertisementLogic
+ destination: string | null
display: ProductPushDisplay
flagGated: boolean
+ label: string | null
productInfo: FileSystemImport | undefined
shouldRender: boolean
}
@@ -52,7 +54,9 @@ export interface navPanelProductPushAdLogicMeta {
productInfo: (arg: any) => FileSystemImport | undefined
display: (arg: any) => ProductPushDisplay
flagGated: (productInfo: FileSystemImport | undefined, featureFlags: FeatureFlagsSet) => boolean
- shouldRender: (hidden: boolean, productInfo: FileSystemImport | undefined, flagGated: boolean) => boolean
+ destination: (display: ProductPushDisplay, productInfo: FileSystemImport | undefined) => string | null
+ label: (display: ProductPushDisplay, productInfo: FileSystemImport | undefined) => string | null
+ shouldRender: (hidden: boolean, flagGated: boolean, destination: string | null) => boolean
}
}
@@ -98,10 +102,22 @@ export const navPanelProductPushAdLogic = kea<navPanelProductPushAdLogicType>([
featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet
): boolean => !!productInfo?.flag && !(featureFlags as Record<string, boolean>)[productInfo.flag],
],
+ // A surface links to its own href/label; a catalog product resolves them from its catalog entry.
+ destination: [
+ (s) => [s.display, s.productInfo],
+ (display: ProductPushDisplay, productInfo: FileSystemImport | undefined): string | null =>
+ display.href ?? productInfo?.href ?? null,
+ ],
+ label: [
+ (s) => [s.display, s.productInfo],
+ (display: ProductPushDisplay, productInfo: FileSystemImport | undefined): string | null =>
+ display.label ?? productInfo?.displayLabel ?? productInfo?.path ?? null,
+ ],
+ // flagGated is always false for a surface (no catalog entry, so no flag), so this covers both.
shouldRender: [
- (s) => [s.hidden, s.productInfo, s.flagGated],
- (hidden: boolean, productInfo: FileSystemImport | undefined, flagGated: boolean): boolean =>
- !hidden && !!productInfo && !flagGated,
+ (s) => [s.hidden, s.flagGated, s.destination],
+ (hidden: boolean, flagGated: boolean, destination: string | null): boolean =>
+ !hidden && !!destination && !flagGated,
],
}),
listeners(({ props }) => {
diff --git a/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushDisplay.ts b/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushDisplay.tsx
similarity index 77%
rename from frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushDisplay.ts
rename to frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushDisplay.tsx
index 0ae6531b784f..2bcc271bee18 100644
--- a/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushDisplay.ts
+++ b/frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushDisplay.tsx
@@ -13,8 +13,12 @@ import * as robot from '@posthog/brand/hoggies/png/robot'
import * as trafficController from '@posthog/brand/hoggies/png/traffic-controller'
import * as wizard from '@posthog/brand/hoggies/png/wizard-1'
import * as workflows from '@posthog/brand/hoggies/png/workflows'
+import { IconAI, IconGithub } from '@posthog/icons'
+import { Logomark } from 'lib/brand'
import { pngHoggie } from 'lib/brand/hoggies'
+import { IconSlack } from 'lib/lemon-ui/icons'
+import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
@@ -43,6 +47,10 @@ export const DEFAULT_PRODUCT_PUSH_DISPLAY: ProductPushDisplay = {
"We think your organization would get a lot out of this product - it works with the data you're already sending. Give it a try!",
}
+// Shared size for the icon-font surface logos (Slack, GitHub, Self-driving). Desktop's Logomark
+// sizes itself via its own `size` prop instead.
+const SURFACE_ICON_CLASS = 'text-[64px]'
+
// One entry per pushable product (see BLESSED_PRODUCT_ORDER / FALLBACK_PRODUCT_ORDER in
// products/growth/backend/product_push/selection.py). Products missing here fall back to
// DEFAULT_PRODUCT_PUSH_DISPLAY, so TAM-scheduled pushes of unlisted products still render.
@@ -137,6 +145,39 @@ export const PRODUCT_PUSH_DISPLAY: Partial<Record<ProductKey, ProductPushDisplay
accentColor: 'var(--color-product-workflows-light)',
tagline: 'Automate messages and actions triggered by what users actually do in your product.',
},
+ // Surfaces that aren't catalog products carry their own label, destination, and logo.
+ [ProductKey.SELF_DRIVING]: {
+ Icon: <IconAI className={`${SURFACE_ICON_CLASS} text-[color:var(--color-purple-300)]`} />,
+ iconBackdrop: true,
+ accentColor: 'var(--color-purple-300)',
+ tagline:
+ 'Let PostHog watch your data and surface what needs attention - findings land in your inbox, ready to act on.',
+ label: 'PostHog Self-driving',
+ href: urls.inbox(),
+ },
+ [ProductKey.POSTHOG_SLACK]: {
+ Icon: <IconSlack className={SURFACE_ICON_CLASS} />,
+ accentColor: 'var(--color-accent)',
+ tagline: 'Ask questions and get answers where your team already works. Add the PostHog app to Slack.',
+ label: 'PostHog in Slack',
+ href: urls.settings('environment-integrations', 'integration-slack'),
+ },
+ [ProductKey.POSTHOG_GITHUB]: {
+ Icon: <IconGithub className={SURFACE_ICON_CLASS} />,
+ accentColor: 'var(--color-text-primary)',
+ tagline: 'Connect GitHub so PostHog in Slack and Self-driving can open pull requests, not just suggest fixes.',
+ label: 'Connect GitHub',
+ href: urls.settings('environment-integrations', 'integration-github'),
+ },
+ [ProductKey.POSTHOG_DESKTOP]: {
+ Icon: <Logomark size="xl" />,
+ iconUpright: true,
+ accentColor: 'var(--color-accent)',
+ tagline:
+ 'The product editor for builders. Run AI agents that use your product data as context to ship changes.',
+ label: 'PostHog Desktop',
+ href: 'https://posthog.com/desktop',
+ },
}
export function getProductPushDisplay(productKey: string): ProductPushDisplay {
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json
index 4ac1032c1e39..bf6e0bfb85e2 100644
--- a/frontend/src/queries/schema.json
+++ b/frontend/src/queries/schema.json
@@ -40252,11 +40252,15 @@
"pipeline_transformations",
"platform_and_support",
"posthog_ai_onboarding",
+ "posthog_desktop",
+ "posthog_github",
+ "posthog_slack",
"product_analytics",
"product_tours",
"pulse",
"revenue_analytics",
"review_hog",
+ "self_driving",
"session_replay",
"replay_vision",
"site_apps",
diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.ts
index ce9a259fc1a0..3c7d6ca57a02 100644
--- a/frontend/src/queries/schema/schema-general.ts
+++ b/frontend/src/queries/schema/schema-general.ts
@@ -10112,11 +10112,15 @@ export enum ProductKey {
PIPELINE_TRANSFORMATIONS = 'pipeline_transformations',
PLATFORM_AND_SUPPORT = 'platform_and_support',
POSTHOG_AI_ONBOARDING = 'posthog_ai_onboarding',
+ POSTHOG_DESKTOP = 'posthog_desktop',
+ POSTHOG_GITHUB = 'posthog_github',
+ POSTHOG_SLACK = 'posthog_slack',
PRODUCT_ANALYTICS = 'product_analytics',
PRODUCT_TOURS = 'product_tours',
PULSE = 'pulse',
REVENUE_ANALYTICS = 'revenue_analytics',
REVIEW_HOG = 'review_hog',
+ SELF_DRIVING = 'self_driving',
SESSION_REPLAY = 'session_replay',
REPLAY_VISION = 'replay_vision',
SITE_APPS = 'site_apps',
diff --git a/posthog/schema_enums.py b/posthog/schema_enums.py
index 0aad3c879bd2..72d9ac700cac 100644
--- a/posthog/schema_enums.py
+++ b/posthog/schema_enums.py
@@ -3726,11 +3726,15 @@ class ProductKey(StrEnum):
PIPELINE_TRANSFORMATIONS = "pipeline_transformations"
PLATFORM_AND_SUPPORT = "platform_and_support"
POSTHOG_AI_ONBOARDING = "posthog_ai_onboarding"
+ POSTHOG_DESKTOP = "posthog_desktop"
+ POSTHOG_GITHUB = "posthog_github"
+ POSTHOG_SLACK = "posthog_slack"
PRODUCT_ANALYTICS = "product_analytics"
PRODUCT_TOURS = "product_tours"
PULSE = "pulse"
REVENUE_ANALYTICS = "revenue_analytics"
REVIEW_HOG = "review_hog"
+ SELF_DRIVING = "self_driving"
SESSION_REPLAY = "session_replay"
REPLAY_VISION = "replay_vision"
SITE_APPS = "site_apps"
diff --git a/posthog/temporal/weekly_digest/activities.py b/posthog/temporal/weekly_digest/activities.py
index 25a692b9a3f9..e1f460757fac 100644
--- a/posthog/temporal/weekly_digest/activities.py
+++ b/posthog/temporal/weekly_digest/activities.py
@@ -561,7 +561,7 @@ async def generate_product_suggestion_lookup(input: GenerateDigestDataBatchInput
# The push is org-wide, but a project that already uses the product
# shouldn't be nudged about it - same rule the nav card applies.
if product_path is None or await database_sync_to_async(project_uses_product)(
- team.project_id, campaign["product_key"]
+ team.project_id, campaign["product_key"], organization_id
):
team_count += 1
continue
diff --git a/products/growth/backend/api/product_push.py b/products/growth/backend/api/product_push.py
index f0c4869c4550..de493ab70ab9 100644
--- a/products/growth/backend/api/product_push.py
+++ b/products/growth/backend/api/product_push.py
@@ -95,7 +95,7 @@ class ProductPushCampaignViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet
team_access_control = UserAccessControl(user=cast(User, request.user), team=team)
if not team_access_control.check_access_level_for_object(team, "member"):
raise NotFound("Team not found.")
- if project_uses_product(team.project_id, campaign.product_key):
+ if project_uses_product(team.project_id, campaign.product_key, team.organization_id):
return Response(status=status.HTTP_204_NO_CONTENT)
return Response(self.get_serializer(campaign).data)
diff --git a/products/growth/backend/product_push/cadence.py b/products/growth/backend/product_push/cadence.py
index 9403e1c83c77..0981a5905e33 100644
--- a/products/growth/backend/product_push/cadence.py
+++ b/products/growth/backend/product_push/cadence.py
@@ -12,10 +12,10 @@ from datetime import date, datetime, timedelta
GRACE_PERIOD_DAYS = 10
# How long a campaign keeps pushing before it is closed as skipped.
-CAMPAIGN_DURATION_DAYS = 14
+CAMPAIGN_DURATION_DAYS = 10
# Quiet period between one campaign ending (for any reason) and the next starting.
-COOLDOWN_DAYS = 7
+COOLDOWN_DAYS = 5
# A skipped (or cancelled) product becomes eligible to push again after this long.
# Deliberately short enough that blessed products keep cycling — an org that skips
diff --git a/products/growth/backend/product_push/selection.py b/products/growth/backend/product_push/selection.py
index 6187f66f0f0b..ee64cf25628a 100644
--- a/products/growth/backend/product_push/selection.py
+++ b/products/growth/backend/product_push/selection.py
@@ -28,6 +28,7 @@ from posthog.schema_enums import ProductKey
from products.growth.backend.models import ProductPushCampaign
from products.growth.backend.product_push.cadence import is_retry_eligible
+from products.growth.backend.product_push.surfaces import SURFACE_ADOPTION_CHECKS, OrganizationId
# The order in which we push products to organizations that don't use them yet.
# Seeded from the preference weights of the retired cross-sell suggester, whose
@@ -36,7 +37,9 @@ from products.growth.backend.product_push.cadence import is_retry_eligible
BLESSED_PRODUCT_ORDER: list[ProductKey] = [
ProductKey.PRODUCT_ANALYTICS,
ProductKey.WEB_ANALYTICS,
+ ProductKey.SELF_DRIVING,
ProductKey.SESSION_REPLAY,
+ ProductKey.POSTHOG_SLACK,
ProductKey.ERROR_TRACKING,
ProductKey.FEATURE_FLAGS,
ProductKey.EXPERIMENTS,
@@ -56,6 +59,8 @@ FALLBACK_PRODUCT_ORDER: list[ProductKey] = [
ProductKey.LLM_PROMPTS,
ProductKey.LOGS,
ProductKey.WORKFLOWS,
+ ProductKey.POSTHOG_DESKTOP,
+ ProductKey.POSTHOG_GITHUB,
]
# Display resolution for pushable products: ProductKey → catalog path (the id the
@@ -128,11 +133,27 @@ def get_org_used_product_keys(organization: Organization) -> set[str]:
if product_type not in ACTIVATION_CHECK_PRODUCT_KEYS or activated_at is not None:
projects_using[product_type].add(project_id)
- return {product for product, projects in projects_using.items() if len(projects) * 2 > total_projects}
+ used = {product for product, projects in projects_using.items() if len(projects) * 2 > total_projects}
+ # Surfaces adopt org-wide from live state, not a ProductIntent row (see surfaces.py).
+ for surface_key, is_adopted in SURFACE_ADOPTION_CHECKS.items():
+ if is_adopted(organization.id):
+ used.add(surface_key)
+
+ return used
+
+
+def project_uses_product(project_id: int, product_key: str, organization_id: OrganizationId) -> bool:
+ """The per-project version of the usage signal in get_org_used_product_keys.
+
+ Growth surfaces are org-wide, so a project "uses" one whenever its organization has
+ adopted it — suppressing the promo in every project once the org connects it. The caller
+ passes organization_id (it always has it) so surfaces resolve without a project lookup.
+ """
+ surface_check = SURFACE_ADOPTION_CHECKS.get(product_key)
+ if surface_check is not None:
+ return surface_check(organization_id)
-def project_uses_product(project_id: int, product_key: str) -> bool:
- """The per-project version of the usage signal in get_org_used_product_keys."""
intents = ProductIntent.objects.filter(team__project_id=project_id, product_type=product_key)
if product_key in ACTIVATION_CHECK_PRODUCT_KEYS:
intents = intents.filter(activated_at__isnull=False)
diff --git a/products/growth/backend/product_push/service.py b/products/growth/backend/product_push/service.py
index 692212f73b7e..a0d04987fb07 100644
--- a/products/growth/backend/product_push/service.py
+++ b/products/growth/backend/product_push/service.py
@@ -32,6 +32,7 @@ from products.growth.backend.product_push.cadence import (
is_retry_eligible,
)
from products.growth.backend.product_push.selection import Selection, select_next_product
+from products.growth.backend.product_push.surfaces import SURFACE_ADOPTION_CHECKS
logger = structlog.get_logger(__name__)
@@ -48,8 +49,8 @@ ON_ACTIVE_POLICIES = (ON_ACTIVE_SKIP, ON_ACTIVE_QUEUE, ON_ACTIVE_OVERRIDE)
@dataclass(frozen=True)
class AdoptionResult:
- signal: str # "intent_activated" | "intent_created"
- team_id: int
+ signal: str # "intent_activated" | "intent_created" | "surface_connected"
+ team_id: int | None = None # None for org-wide surfaces (Desktop, Slack, GitHub, Self-driving)
@dataclass(kw_only=True)
@@ -87,6 +88,12 @@ class StartBatchResult:
def org_adopted_product(organization_id: str, product_key: str, since: datetime) -> AdoptionResult | None:
"""Did any team in the org start using the product after `since`?"""
+ surface_check = SURFACE_ADOPTION_CHECKS.get(product_key)
+ if surface_check is not None:
+ # A campaign only starts for an org that hasn't adopted the surface, so being adopted now
+ # means it happened during the campaign — no per-org timestamp to compare against `since`.
+ return AdoptionResult(signal="surface_connected") if surface_check(organization_id) else None
+
intents = ProductIntent.objects.filter(team__organization_id=organization_id, product_type=product_key)
if product_key not in ACTIVATION_CHECK_PRODUCT_KEYS:
diff --git a/products/growth/backend/product_push/surfaces.py b/products/growth/backend/product_push/surfaces.py
new file mode 100644
index 000000000000..26edd7a4d91e
--- /dev/null
+++ b/products/growth/backend/product_push/surfaces.py
@@ -0,0 +1,46 @@
+"""Adoption checks for the non-catalog surfaces the product push card advertises.
+
+Desktop, Slack, GitHub, and Self-driving aren't catalog products, so their "does the org
+already use this" signal isn't a ProductIntent row — it's live org state read by org id: a
+Slack or GitHub integration, accepted desktop beta terms, or an acted-on Self-driving report.
+Each surface is org-wide, so a connection anywhere in the org counts.
+
+Selection reads these to keep advertising a surface until the org adopts it; the campaign
+service reads them to close an active campaign as adopted once it does.
+"""
+
+import uuid
+from collections.abc import Callable
+from functools import partial
+
+from posthog.models.integration import Integration
+from posthog.schema_enums import ProductKey
+
+OrganizationId = str | uuid.UUID
+
+
+def organization_has_integration(organization_id: OrganizationId, kind: str) -> bool:
+ return Integration.objects.filter(team__organization_id=organization_id, kind=kind).exists()
+
+
+def organization_accepted_desktop_beta_terms(organization_id: OrganizationId) -> bool:
+ # Deferred: the tasks facade pulls in a heavy dependency tree kept off the web startup path.
+ from products.tasks.backend.facade import api as tasks_facade # noqa: PLC0415
+
+ org_uuid = organization_id if isinstance(organization_id, uuid.UUID) else uuid.UUID(organization_id)
+ return tasks_facade.get_desktop_beta_terms_acceptance(org_uuid).is_desktop_beta_terms_accepted
+
+
+def organization_acted_on_signal(organization_id: OrganizationId) -> bool:
+ # Deferred: the signals facade pulls in the Temporal stack kept off the web startup path.
+ from products.signals.backend.facade import api as signals_facade # noqa: PLC0415
+
+ return signals_facade.organization_acted_on_report(organization_id)
+
+
+SURFACE_ADOPTION_CHECKS: dict[str, Callable[..., bool]] = {
+ ProductKey.POSTHOG_SLACK.value: partial(organization_has_integration, kind=Integration.IntegrationKind.SLACK),
+ ProductKey.POSTHOG_GITHUB.value: partial(organization_has_integration, kind=Integration.IntegrationKind.GITHUB),
+ ProductKey.POSTHOG_DESKTOP.value: organization_accepted_desktop_beta_terms,
+ ProductKey.SELF_DRIVING.value: organization_acted_on_signal,
+}
diff --git a/products/growth/backend/tests/test_product_push_cadence.py b/products/growth/backend/tests/test_product_push_cadence.py
index 4e596dd0b37a..9bc8a66100ec 100644
--- a/products/growth/backend/tests/test_product_push_cadence.py
+++ b/products/growth/backend/tests/test_product_push_cadence.py
@@ -29,8 +29,8 @@ class TestProductPushCadence(SimpleTestCase):
@parameterized.expand(
[
("no_prior_campaign", None, True),
- ("day_6_still_cooling", datetime(2026, 6, 25, 13, 0, tzinfo=UTC), False),
- ("day_7_exactly_over", datetime(2026, 6, 24, 12, 0, tzinfo=UTC), True),
+ ("day_4_still_cooling", datetime(2026, 6, 27, 13, 0, tzinfo=UTC), False),
+ ("day_5_exactly_over", datetime(2026, 6, 26, 12, 0, tzinfo=UTC), True),
]
)
def test_cooldown_boundary(self, _name: str, last_ended_at: datetime | None, expected: bool) -> None:
@@ -55,5 +55,5 @@ class TestProductPushCadence(SimpleTestCase):
def test_retry_boundary(self, _name: str, ended_at: datetime, expected: bool) -> None:
assert is_retry_eligible(ended_at, NOW) is expected
- def test_campaign_runs_14_days_from_its_own_start(self) -> None:
- assert campaign_ends_at(NOW) == datetime(2026, 7, 15, 12, 0, tzinfo=UTC)
+ def test_campaign_runs_10_days_from_its_own_start(self) -> None:
+ assert campaign_ends_at(NOW) == datetime(2026, 7, 11, 12, 0, tzinfo=UTC)
diff --git a/products/growth/backend/tests/test_product_push_selection.py b/products/growth/backend/tests/test_product_push_selection.py
index 04da657b9fd6..0ed21f46d656 100644
--- a/products/growth/backend/tests/test_product_push_selection.py
+++ b/products/growth/backend/tests/test_product_push_selection.py
@@ -17,8 +17,10 @@ from products.growth.backend.product_push.selection import (
BLESSED_PRODUCT_ORDER,
FALLBACK_PRODUCT_ORDER,
PUSH_PRODUCT_PATHS,
+ get_org_used_product_keys,
select_next_product,
)
+from products.growth.backend.product_push.surfaces import SURFACE_ADOPTION_CHECKS
NOW = datetime(2026, 7, 1, 12, 0, tzinfo=UTC)
@@ -52,14 +54,15 @@ class TestSelectNextProduct(BaseTest):
assert selection.product_key == "web_analytics"
def test_any_intent_excludes_product_without_activation_criterion(self) -> None:
- # web_analytics has no activation criterion — a bare intent row is the usage signal.
+ # web_analytics has no activation criterion — a bare intent row is the usage signal. With
+ # both top products excluded, the walk lands on the next blessed entry (self_driving).
ProductIntent.objects.create(team=self.team, product_type="product_analytics", activated_at=NOW)
ProductIntent.objects.create(team=self.team, product_type="web_analytics")
selection = select_next_product(self.organization, NOW)
assert selection is not None
- assert selection.product_key == "session_replay"
+ assert selection.product_key == "self_driving"
@parameterized.expand(
[
@@ -140,6 +143,38 @@ class TestSelectNextProduct(BaseTest):
assert selection.product_key in {product_key.value for product_key in FALLBACK_PRODUCT_ORDER}
assert selection.scheduled_campaign is None
+ def test_org_that_connected_a_surface_no_longer_has_it_pushed(self) -> None:
+ # A growth surface is org-wide: connecting it once (here, the Slack app) marks the whole org
+ # as using it, so the rotation stops advertising it — even with no ProductIntent row.
+ from posthog.models.integration.model import Integration
+
+ assert "posthog_slack" not in get_org_used_product_keys(self.organization)
+
+ Integration.objects.create(
+ team=self.team, kind=Integration.IntegrationKind.SLACK, integration_id="T123", config={}, errors=""
+ )
+
+ assert "posthog_slack" in get_org_used_product_keys(self.organization)
+
+ def test_surface_reached_in_the_walk_is_skipped_once_adopted(self) -> None:
+ # Exclude every blessed product above posthog_slack so the walk lands on it, then connect
+ # Slack and confirm the walk steps past the adopted surface to the next blessed product.
+ from posthog.models.integration.model import Integration
+
+ ProductIntent.objects.create(team=self.team, product_type="product_analytics", activated_at=NOW)
+ ProductIntent.objects.create(team=self.team, product_type="web_analytics")
+ self._campaign("self_driving", ProductPushCampaign.Status.ADOPTED, ended_at=NOW - timedelta(days=200))
+ self._campaign("session_replay", ProductPushCampaign.Status.ADOPTED, ended_at=NOW - timedelta(days=200))
+
+ selection = select_next_product(self.organization, NOW)
+ assert selection is not None and selection.product_key == "posthog_slack"
+
+ Integration.objects.create(
+ team=self.team, kind=Integration.IntegrationKind.SLACK, integration_id="T9", config={}, errors=""
+ )
+ selection = select_next_product(self.organization, NOW)
+ assert selection is not None and selection.product_key == "error_tracking"
+
def test_returns_none_when_every_pushable_product_is_excluded(self) -> None:
for product_key in [*BLESSED_PRODUCT_ORDER, *FALLBACK_PRODUCT_ORDER]:
self._campaign(product_key.value, ProductPushCampaign.Status.ADOPTED, ended_at=NOW - timedelta(days=10))
@@ -153,6 +188,10 @@ class TestPushProductConfig(SimpleTestCase):
# unreleased item) would render a broken or dead-end promo card.
catalog = {product.path: product.category for product in Products.products()}
for product_key in [*BLESSED_PRODUCT_ORDER, *FALLBACK_PRODUCT_ORDER]:
+ # Growth surfaces (Desktop, Slack, GitHub, Self-driving) aren't catalog products — they
+ # carry their own label and destination in the frontend display config instead.
+ if product_key.value in SURFACE_ADOPTION_CHECKS:
+ continue
path = PUSH_PRODUCT_PATHS.get(product_key)
assert path is not None, f"{product_key} has no PUSH_PRODUCT_PATHS entry"
assert path in catalog, f"{product_key} maps to {path!r}, which is not in the product catalog"
diff --git a/products/growth/backend/tests/test_product_push_service.py b/products/growth/backend/tests/test_product_push_service.py
index 9f8724601d15..a2c7ba087c8e 100644
--- a/products/growth/backend/tests/test_product_push_service.py
+++ b/products/growth/backend/tests/test_product_push_service.py
@@ -137,6 +137,23 @@ class TestProductPushService(BaseTest):
assert campaign.metadata["adoption_signal"] == "intent_activated"
assert campaign.metadata["adoption_team_id"] == self.team.id
+ def test_surface_campaign_closes_as_adopted_when_org_connects_it(self) -> None:
+ # A surface campaign closes as adopted once the org connects the surface — here the Slack
+ # app — read straight from live state, with no ProductIntent involved.
+ from posthog.models.integration.model import Integration
+
+ campaign = self._active_campaign("posthog_slack")
+ Integration.objects.create(
+ team=self.team, kind=Integration.IntegrationKind.SLACK, integration_id="T1", config={}, errors=""
+ )
+
+ result = evaluate_and_close_campaign_batch([str(campaign.id)], self.now)
+
+ assert result.adopted == 1
+ campaign.refresh_from_db()
+ assert campaign.status == ProductPushCampaign.Status.ADOPTED
+ assert campaign.metadata["adoption_signal"] == "surface_connected"
+
def test_activation_before_campaign_start_does_not_count(self) -> None:
campaign = self._active_campaign("product_analytics", started_days_ago=5)
intent = ProductIntent.objects.create(team=self.team, product_type="product_analytics")
diff --git a/products/signals/backend/facade/api.py b/products/signals/backend/facade/api.py
index 6434676348ca..ddf28ec3951b 100644
--- a/products/signals/backend/facade/api.py
+++ b/products/signals/backend/facade/api.py
@@ -345,6 +345,18 @@ def has_enabled_source(team_id: int) -> bool:
return _has_emitting_replay_scanner(team_id)
+def organization_acted_on_report(organization_id: "str | uuid.UUID") -> bool:
+ """True once someone in the org has acted on a Self-driving report — resolved or dismissed one.
+
+ Growth's product push reads this to stop advertising Self-driving to an org that already
+ engages with it, and to close an active Self-driving campaign as adopted.
+ """
+ return SignalReport.objects.filter(
+ team__organization_id=organization_id,
+ status__in=[SignalReport.Status.RESOLVED, SignalReport.Status.SUPPRESSED],
+ ).exists()
+
+
def team_ids_with_source_product_enabled(source_product: str) -> list[int]:
"""Team ids with at least one enabled source of ``source_product`` — the enrolment list a
product's own scheduled emitter fans out over (e.g. engineering_analytics' CI-signals
diff --git a/tach.toml b/tach.toml
index a76de4954cd1..ecee816839a2 100644
--- a/tach.toml
+++ b/tach.toml
@@ -460,6 +460,7 @@ path = "products.growth"
depends_on = [
"ee",
"posthog", "products.access_control",
+ "products.signals", "products.tasks",
]
layer = "modules"