Generated file

Copy as Markdown

Other Tools

// AUTOGENERATED BY glean_parser. DO NOT EDIT.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_GleanReferralsMetrics_h
#define mozilla_GleanReferralsMetrics_h
#include "mozilla/glean/bindings/MetricTypes.h"
namespace mozilla::glean {
namespace browser {
/**
* generated from browser.referral_code
* The referral code extracted from attribution data on first run. Recorded
* and submitted via the separate `referrals` ping so that the referral code
* is kept out of regular attribution data (bug 2055255).
*/
constexpr impl::StringMetric referral_code(610);
}
namespace referrals {
/**
* generated from referrals.entrypoint_clicked
*/
struct EntrypointClickedExtra {
mozilla::Maybe<nsCString> entrypoint;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (entrypoint) {
extraKeys.AppendElement()->AssignASCII("entrypoint");
extraValues.EmplaceBack(entrypoint.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when a user activates one of the referral program entry points
* to open about:referrals.
*/
constexpr impl::EventMetric<EntrypointClickedExtra> entrypoint_clicked(933);
}
} // namespace mozilla::glean
#endif // mozilla_GleanReferralsMetrics_h