Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-analytics): Display data relevant to currently selected conversion goal #26586

Merged
merged 17 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export const FEATURE_FLAGS = {
REPLAY_LIST_RECORDINGS_AS_QUERY: 'replay-list-recordings-as-query', // owner: @pauldambra #team-replay
BILLING_SKIP_FORECASTING: 'billing-skip-forecasting', // owner: @zach
WEB_ANALYTICS_PERIOD_COMPARISON: 'web-analytics-period-comparison', // owner: @rafaeelaudibert #team-web-analytics
WEB_ANALYTICS_CONVERSION_GOAL_FILTERS: 'web-analytics-conversion-goal-filters', // owner: @rafaeelaudibert #team-web-analytics
} as const
export type FeatureFlagKey = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS]

Expand Down
11 changes: 11 additions & 0 deletions frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12666,6 +12666,17 @@
"$ref": "#/definitions/CompareFilter",
"description": "Compare to date range"
},
"conversionGoal": {
"anyOf": [
{
"$ref": "#/definitions/WebAnalyticsConversionGoal"
},
{
"type": "null"
}
],
"description": "Whether we should be comparing against a specific conversion goal"
},
"dateRange": {
"$ref": "#/definitions/InsightDateRange",
"description": "Date range for the query"
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ export interface TrendsQuery extends InsightsQueryBase<TrendsQueryResponse> {
breakdownFilter?: BreakdownFilter
/** Compare to date range */
compareFilter?: CompareFilter
/** Whether we should be comparing against a specific conversion goal */
conversionGoal?: WebAnalyticsConversionGoal | null
}

export type AssistantArrayPropertyFilterOperator = PropertyOperator.Exact | PropertyOperator.IsNot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function WebAnalyticsRecordingsTile({ tile }: { tile: ReplayTile }): JSX.
const { layout } = tile
const { replayFilters, webAnalyticsFilters } = useValues(webAnalyticsLogic)
const { currentTeam } = useValues(teamLogic)

const sessionRecordingsListLogicInstance = sessionRecordingsPlaylistLogic({
logicKey: 'webAnalytics',
filters: replayFilters,
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ export const webAnalyticsDataTableQueryContext: QueryContext = {
render: VariationCell(),
align: 'right',
},
unique_conversions: {
title: <span className="pr-5">Unique Conversions</span>,
render: VariationCell(),
align: 'right',
},
conversion_rate: {
title: <span className="pr-5">Conversion Rate</span>,
render: VariationCell({ isPercentage: true }),
Expand Down
199 changes: 127 additions & 72 deletions frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx

Large diffs are not rendered by default.

Loading
Loading