PackageRecommendations: Add modelVersion to analytics tracking

Previous commit 852d24e5 added modelVersion to the API response and mentioned
adding it to analytics tracking, but only added the distribution field to
the analytics events. This commit completes the implementation by adding
modelVersion to both package recommendation analytics events:

- "Package Recommendations Shown" event now includes modelVersion
- "Recommended Package Added" event now includes modelVersion

This enables proper tracking of which recommendation models are being used
and their effectiveness.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Lucas Garfield 2025-07-14 09:38:02 -05:00 committed by Klara Simickova
parent b6e9fef70b
commit fd474dace0

View file

@ -100,6 +100,7 @@ const PackageRecommendations = () => {
shownRecommendations: response.data.packages,
selectedPackages: packages.map((pkg) => pkg.name),
distribution: distribution.replace('-', ''),
modelVersion: response.data.modelVersion,
}
);
}
@ -267,6 +268,7 @@ const PackageRecommendations = () => {
),
shownRecommendations: data.packages,
distribution: distribution.replace('-', ''),
modelVersion: data.modelVersion,
}
);
addRecommendedPackage(pkg);