in lib/messageUtils.ts [205:254]
export function getAndroidDashboardLink(
surface: string,
msgIdPrefix: string,
channel?: string,
experiment?: string,
branchSlug?: string,
startDate?: string | null,
endDate?: string | null,
isCompleted?: boolean,
): string | undefined {
// The isCompleted value can be useful for messages that used to be in remote
// settings or old versions of Firefox.
const submissionDate = getLookerSubmissionTimestampDateFilter(
startDate,
endDate,
isCompleted,
);
const dashboardId = getSurfaceData(surface).lookerDashboardId; // messages/push notification
let baseUrl = `https://mozilla.cloud.looker.com/dashboards/${dashboardId}`;
let paramObj;
paramObj = {
"Submission Date": submissionDate,
"Normalized Channel": channel ? channel : "",
"Normalized OS": "",
"Client Info App Display Version": "",
"Normalized Country Code": "",
"Experiment Slug": experiment ? experiment : "", // XXX
"Experiment Branch": branchSlug ? branchSlug : "",
// XXX assumes last part of message id is something like
// "-en-us" and chops that off, since we want to know about
// all the messages in the experiment. Will break
// (in "no results" way) on experiment with messages not configured
// like that.
Value: msgIdPrefix.slice(0, -5) + "%", // XXX
};
// XXX we really handle all messaging surfaces, at least in theory
if (surface !== "survey") return undefined;
if (paramObj) {
const params = new URLSearchParams(Object.entries(paramObj));
let url = new URL(baseUrl);
url.search = params.toString();
return url.toString();
}
return undefined;
}