Skip to content

insights: Group the tab click pings by tabName

Administrator requested to merge insights/tab-pings into main

Created by: CristinaBirkel

The landing page click pings for tabs and tabs "show more" were only emitting totals, and not grouped by tabName. This PR groups them by tabName.

Test plan

I tested this locally by clicking the tabs and "show more" buttons on the landing page, and verifying that the click pings were showing up as grouped in site-admin/pings under WeeklyGetStartedTabClickByTab and WeeklyGetStartedTabMoreClickByTab.

"codeInsightsUsage": {
        "WeekStart": "2022-02-14T00:00:00Z",
        "InsightOrgVisible": [
            {
                "Type": "search",
                "TotalCount": 4
            }
        ],
        "InsightTotalCounts": {
            "ViewCounts": [
                {
                    "ViewType": "PIE",
                    "TotalCount": 6
                },
                {
                    "ViewType": "LINE",
                    "TotalCount": 89
                }
            ],
            "SeriesCounts": [
                {
                    "TotalCount": 29,
                    "GenerationType": "search::global::recorded"
                },
                {
                    "TotalCount": 5,
                    "GenerationType": "capture-groups::global::recorded"
                },
                {
                    "TotalCount": 5,
                    "GenerationType": "language-stats::scoped::jit"
                },
                {
                    "TotalCount": 44,
                    "GenerationType": "search::scoped::jit"
                },
                {
                    "TotalCount": 6,
                    "GenerationType": "capture-groups::scoped::jit"
                },
                {
                    "TotalCount": 1,
                    "GenerationType": "search-stream::global::recorded"
                }
            ],
            "ViewSeriesCounts": [
                {
                    "ViewType": "LINE",
                    "TotalCount": 1,
                    "GenerationType": "search-stream::global::recorded"
                },
                {
                    "ViewType": "LINE",
                    "TotalCount": 49,
                    "GenerationType": "search::global::recorded"
                },
                {
                    "ViewType": "LINE",
                    "TotalCount": 5,
                    "GenerationType": "capture-groups::global::recorded"
                },
                {
                    "ViewType": "LINE",
                    "TotalCount": 43,
                    "GenerationType": "search::scoped::jit"
                },
                {
                    "ViewType": "LINE",
                    "TotalCount": 6,
                    "GenerationType": "capture-groups::scoped::jit"
                },
                {
                    "ViewType": "PIE",
                    "TotalCount": 5,
                    "GenerationType": "language-stats::scoped::jit"
                },
                {
                    "ViewType": "PIE",
                    "TotalCount": 1,
                    "GenerationType": "search::scoped::jit"
                }
            ]
        },
        "InsightTimeIntervals": [
            {
                "TotalCount": 1,
                "IntervalDays": 180
            },
            {
                "TotalCount": 5,
                "IntervalDays": 14
            },
            {
                "TotalCount": 11,
                "IntervalDays": 60
            },
            {
                "TotalCount": 3,
                "IntervalDays": 3
            },
            {
                "TotalCount": 15,
                "IntervalDays": 21
            },
            {
                "TotalCount": 1,
                "IntervalDays": 4
            },
            {
                "TotalCount": 1,
                "IntervalDays": 42
            },
            {
                "TotalCount": 2,
                "IntervalDays": 7
            },
            {
                "TotalCount": 43,
                "IntervalDays": 30
            },
            {
                "TotalCount": 3,
                "IntervalDays": 0
            },
            {
                "TotalCount": 2,
                "IntervalDays": 90
            },
            {
                "TotalCount": 3,
                "IntervalDays": 35
            }
        ],
        "WeeklyAggregatedUsage": [
            {
                "Name": "CodeInsightsCreateSearchBasedInsightClick",
                "TotalCount": 1,
                "UniqueCount": 1
            },
            {
                "Name": "CodeInsightsSearchBasedCreationPageSubmitClick",
                "TotalCount": 1,
                "UniqueCount": 1
            },
            {
                "Name": "InsightsGetStartedPageQueryModification",
                "TotalCount": 1,
                "UniqueCount": 1
            },
            {
                "Name": "ViewCodeInsightsCreationPage",
                "TotalCount": 5,
                "UniqueCount": 2
            },
            {
                "Name": "ViewCodeInsightsSearchBasedCreationPage",
                "TotalCount": 1,
                "UniqueCount": 1
            }
        ],
        "WeeklyInsightCreators": 1,
        "WeeklyInsightsPageViews": 58,
        "WeeklyInsightAddMoreClick": 3,
        "WeeklyInsightConfigureClick": 0,
        "WeeklyGetStartedTabClickByTab": [
            {
                "TabName": "Adoption",
                "TotalCount": 4
            },
            {
                "TabName": "Code health",
                "TotalCount": 6
            },
            {
                "TabName": "Deprecation",
                "TotalCount": 6
            },
            {
                "TabName": "Migration",
                "TotalCount": 4
            },
            {
                "TabName": "Other",
                "TotalCount": 8
            },
            {
                "TabName": "Popular",
                "TotalCount": 1
            },
            {
                "TabName": "Security",
                "TotalCount": 7
            },
            {
                "TabName": "Versions and patterns",
                "TotalCount": 7
            }
        ],
        "WeeklyInsightsUniquePageViews": 3,
        "WeeklyFirstTimeInsightCreators": 0,
        "WeeklyUsageStatisticsByInsight": [
            {
                "Edits": 0,
                "Hovers": 6,
                "Removals": 0,
                "Additions": 0,
                "InsightType": "CaptureGroup",
                "DataPointClicks": 0,
                "UICustomizations": 0
            },
            {
                "Edits": 0,
                "Hovers": 0,
                "Removals": 0,
                "Additions": 1,
                "InsightType": "captureGroupInsights",
                "DataPointClicks": 0,
                "UICustomizations": 0
            },
            {
                "Edits": 0,
                "Hovers": 0,
                "Removals": 0,
                "Additions": 1,
                "InsightType": "searchInsights",
                "DataPointClicks": 0,
                "UICustomizations": 0
            },
            {
                "Edits": 0,
                "Hovers": 3,
                "Removals": 0,
                "Additions": 0,
                "InsightType": "SearchBased",
                "DataPointClicks": 0,
                "UICustomizations": 0
            },
            {
                "Edits": 0,
                "Hovers": 4,
                "Removals": 0,
                "Additions": 0,
                "InsightType": "InProductLandingPageInsight",
                "DataPointClicks": 0,
                "UICustomizations": 0
            }
        ],
        "WeeklyGetStartedTabMoreClickByTab": [
            {
                "TabName": "Adoption",
                "TotalCount": 2
            },
            {
                "TabName": "Code health",
                "TotalCount": 3
            },
            {
                "TabName": "Deprecation",
                "TotalCount": 10
            },
            {
                "TabName": "Migration",
                "TotalCount": 2
            },
            {
                "TabName": "Other",
                "TotalCount": 1
            },
            {
                "TabName": "Popular",
                "TotalCount": 2
            },
            {
                "TabName": "Security",
                "TotalCount": 1
            },
            {
                "TabName": "Versions and patterns",
                "TotalCount": 8
            }
        ],
        "WeeklyInsightsGetStartedPageViews": 5,
        "WeeklyInsightsGetStartedUniquePageViews": 1
    },

Merge request reports

Loading