Skip to content

Commit

Permalink
Rename generateRetentionMetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth committed Jan 22, 2025
1 parent 46056ad commit afe01fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/js/background/components/abn-experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { sendPixelRequest } from '../pixels';
/**
* @returns {ExperimentMetric[]}
*/
export function generateBuildRetentionMetrics() {
export function generateRetentionMetrics() {
return ['app_use', 'search'].flatMap((metric) => {
const metrics = [0, 1, 2, 3, 4, 5, 6, 7].map((conversionWindowStart) => ({
metric,
Expand Down Expand Up @@ -133,7 +133,7 @@ export default class AbnExperimentMetrics {
const cohort = this.remoteConfig.getCohort(featureName, subFeatureName);
if (cohort && !cohort.enrolledAt) {
cohort.enrolledAt = Date.now();
cohort.metrics = (metrics || generateBuildRetentionMetrics()).map((m) => ({ ...m, counter: 0, sent: false }));
cohort.metrics = (metrics || generateRetentionMetrics()).map((m) => ({ ...m, counter: 0, sent: false }));
sendPixelRequest(`experiment_enroll_${subFeatureName}_${cohort.name}`, {
enrollmentDate: new Date(cohort.enrolledAt).toISOString().slice(0, 10),
});
Expand Down

0 comments on commit afe01fc

Please sign in to comment.