This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
forked from elk-zone/elk
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from MozillaSocial/fix/glean-add-real-data
fix(glean): add account data, wire up link/button click events
- Loading branch information
Showing
10 changed files
with
512 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* 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/. */ | ||
|
||
// AUTOGENERATED BY glean_parser v8.1.1. DO NOT EDIT. DO NOT COMMIT. | ||
|
||
import StringMetricType from "@mozilla/glean/private/metrics/string"; | ||
|
||
/** | ||
* The Adjust device ID for this user, if available. | ||
* | ||
* Generated from `identifiers.adjust_device_id`. | ||
*/ | ||
export const adjustDeviceId = new StringMetricType({ | ||
category: "identifiers", | ||
name: "adjust_device_id", | ||
sendInPings: ["events"], | ||
lifetime: "ping", | ||
disabled: false, | ||
}); | ||
|
||
/** | ||
* The user's FxA account ID, if available. | ||
* | ||
* Generated from `identifiers.fxa_account_id`. | ||
*/ | ||
export const fxaAccountId = new StringMetricType({ | ||
category: "identifiers", | ||
name: "fxa_account_id", | ||
sendInPings: ["events"], | ||
lifetime: "ping", | ||
disabled: false, | ||
}); | ||
|
||
/** | ||
* The user's account handle. | ||
* | ||
* Generated from `identifiers.mastodon_account_handle`. | ||
*/ | ||
export const mastodonAccountHandle = new StringMetricType({ | ||
category: "identifiers", | ||
name: "mastodon_account_handle", | ||
sendInPings: ["events"], | ||
lifetime: "application", | ||
disabled: false, | ||
}); | ||
|
||
/** | ||
* The user's numeric account ID from Mastodon. | ||
* | ||
* Generated from `identifiers.mastodon_account_id`. | ||
*/ | ||
export const mastodonAccountId = new StringMetricType({ | ||
category: "identifiers", | ||
name: "mastodon_account_id", | ||
sendInPings: ["events"], | ||
lifetime: "application", | ||
disabled: false, | ||
}); | ||
|
||
/** | ||
* The domain of the Mastodon instance where the user's Mastodon account is hosted | ||
* (e.g. `mozilla.social`). | ||
* | ||
* Generated from `identifiers.mastodon_instance_domain`. | ||
*/ | ||
export const mastodonInstanceDomain = new StringMetricType({ | ||
category: "identifiers", | ||
name: "mastodon_instance_domain", | ||
sendInPings: ["events"], | ||
lifetime: "application", | ||
disabled: false, | ||
}); | ||
|
||
/** | ||
* The device user agent string. | ||
* | ||
* Generated from `identifiers.user_agent`. | ||
*/ | ||
export const userAgent = new StringMetricType({ | ||
category: "identifiers", | ||
name: "user_agent", | ||
sendInPings: ["events"], | ||
lifetime: "application", | ||
disabled: false, | ||
}); | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* 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/. */ | ||
|
||
// AUTOGENERATED BY glean_parser v8.1.1. DO NOT EDIT. DO NOT COMMIT. | ||
|
||
import EventMetricType from "@mozilla/glean/private/metrics/event"; | ||
|
||
/** | ||
* Event triggered when a user taps/clicks on a UI element, triggering a change in | ||
* app state. | ||
* | ||
* Generated from `ui.engagement`. | ||
*/ | ||
export const engagement = new EventMetricType<{ | ||
corpus_recommendation_id?: string, | ||
engagement_type?: string, | ||
engagement_value?: string, | ||
mastodon_status_id?: string, | ||
ui_additional_detail?: string, | ||
ui_identifier?: string, | ||
}>({ | ||
category: "ui", | ||
name: "engagement", | ||
sendInPings: ["events"], | ||
lifetime: "ping", | ||
disabled: false, | ||
}, ["corpus_recommendation_id", "engagement_type", "engagement_value", "mastodon_status_id", "ui_additional_detail", "ui_identifier"]); | ||
|
||
/** | ||
* Event triggered when a user views a notable UI element. Triggered once per page | ||
* load, as soon as any pixel of that UI element is visible in the foreground for | ||
* any length of time. UI elements may include: content, pages, CTAs, etc. | ||
* | ||
* Generated from `ui.impression`. | ||
*/ | ||
export const impression = new EventMetricType<{ | ||
corpus_recommendation_id?: string, | ||
mastodon_status_id?: string, | ||
ui_additional_detail?: string, | ||
ui_identifier?: string, | ||
}>({ | ||
category: "ui", | ||
name: "impression", | ||
sendInPings: ["events"], | ||
lifetime: "ping", | ||
disabled: false, | ||
}, ["corpus_recommendation_id", "mastodon_status_id", "ui_additional_detail", "ui_identifier"]); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* 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/. */ | ||
|
||
// AUTOGENERATED BY glean_parser v8.1.1. DO NOT EDIT. DO NOT COMMIT. | ||
|
||
import StringMetricType from "@mozilla/glean/private/metrics/string"; | ||
import EventMetricType from "@mozilla/glean/private/metrics/event"; | ||
|
||
/** | ||
* Event triggered when a user clicks a link on a web page. | ||
* | ||
* Generated from `web.link_click`. | ||
*/ | ||
export const linkClick = new EventMetricType<{ | ||
element_id?: string, | ||
target_url?: string, | ||
}>({ | ||
category: "web", | ||
name: "link_click", | ||
sendInPings: ["events"], | ||
lifetime: "ping", | ||
disabled: false, | ||
}, ["element_id", "target_url"]); | ||
|
||
/** | ||
* The full URL of the page that was visited, along with URL query parameters. For | ||
* example, `https://mozilla.social/home?utm_source=test`. | ||
* | ||
* Generated from `web.page_url`. | ||
*/ | ||
export const pageUrl = new StringMetricType({ | ||
category: "web", | ||
name: "page_url", | ||
sendInPings: ["events"], | ||
lifetime: "application", | ||
disabled: false, | ||
}); | ||
|
||
/** | ||
* Event triggered when a user requests to load a web page. | ||
* | ||
* Generated from `web.page_view`. | ||
*/ | ||
export const pageView = new EventMetricType({ | ||
category: "web", | ||
name: "page_view", | ||
sendInPings: ["events"], | ||
lifetime: "ping", | ||
disabled: false, | ||
}, []); | ||
|
||
/** | ||
* The full URL of the previous web page from which a link was followed in order | ||
* to trigger the page view. Comes from the `referer` field of the HTTP header. | ||
* May not always be available. For example, `https://www.google.com`. | ||
* | ||
* Generated from `web.referrer_url`. | ||
*/ | ||
export const referrerUrl = new StringMetricType({ | ||
category: "web", | ||
name: "referrer_url", | ||
sendInPings: ["events"], | ||
lifetime: "application", | ||
disabled: false, | ||
}); | ||
|
||
|
Oops, something went wrong.