Skip to content
This repository was archived by the owner on Feb 29, 2020. It is now read-only.

Bug 1480513: Add telemetry for search shortcut - #4290

Merged
ncloudioj merged 4 commits into
mozilla:masterfrom
ncloudioj:gh1480513
Aug 9, 2018
Merged

Bug 1480513: Add telemetry for search shortcut#4290
ncloudioj merged 4 commits into
mozilla:masterfrom
ncloudioj:gh1480513

Conversation

@ncloudioj

@ncloudioj ncloudioj commented Aug 7, 2018

Copy link
Copy Markdown
Member

This documents the telemetry part for search shortcuts in Top Sites of Activity Stream.

@fmarier Could you take a look at this please? The data review request was attached at here

Comment thread docs/v2-system-addon/data_events.md Outdated
"icon_type": ["screenshot_with_icon" | "screenshot" | "tippytop" | "rich_icon" | "no_image"]
"card_type": ["pinned" | "search"],
"icon_type": ["screenshot_with_icon" | "screenshot" | "tippytop" | "rich_icon" | "no_image"],
"search_vendor": ["google" | "amazon" | "baidu" | "yandex"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be added to Blocking a site and pinning as well I think. Or would pinning be covered by adding a search shortcut?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this will be added to those two events.

@ncloudioj

Copy link
Copy Markdown
Member Author

r? @piatra, I figure you're the best reviewer for this patch, since you added both "card_type" and "searchTopSite" :)

Note that the "ADD_SEARCH_SHORTCUT" and "EDIT_SEARCH_SHORTCUT" events would be implemented separately by Bug 1480507, I've added the document for them here so that we only need one data review for the whole feature.

@ncloudioj
ncloudioj requested a review from piatra August 7, 2018 21:31
@ncloudioj ncloudioj changed the title Bug 1480513: part 1 - add telemetry document for search shortcut Bug 1480513: Add telemetry for search shortcut Aug 8, 2018

@piatra piatra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

// Set the card_type as "search" regardless of its pinning status
value.card_type = "search";
// Extract search vendor from the label, i.e. "@search_vendor" => "search_vendor"
value.search_vendor = this.props.link.label.slice(1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should just be link.hostname

Comment thread docs/v2-system-addon/data_events.md Outdated
"icon_type": ["screenshot_with_icon" | "screenshot" | "tippytop" | "rich_icon" | "no_image"]
"card_type": ["pinned" | "search"],
"icon_type": ["screenshot_with_icon" | "screenshot" | "tippytop" | "rich_icon" | "no_image"],
"search_vendor": ["google" | "amazon"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you confirm that these are the only ones? spec has more
grafik

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about the definite vendor list atm, I'll add a note for this field in data_dictionary.md

| `client_id` | [Required] An identifier for this client. | :one:
| `card_type` | [Optional] ("bookmark", "pocket", "trending", "pinned") | :one:
| `card_type` | [Optional] ("bookmark", "pocket", "trending", "pinned", "search") | :one:
| `search_vendor` | [Optional] the vendor of the search shortcut, one of ("google", "amazon", "wikipedia", "duckduckgo", "bing", etc.). This field only exists when `card_type = "search"` | :one:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be misreading the code in the previous file, but wouldn't this.props.link.hostname return google.com, amazon.com or wikipedia.org?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe hostname is already shortened by shortURL

@ncloudioj

Copy link
Copy Markdown
Member Author

@ncloudioj
ncloudioj merged commit 1f2cdf8 into mozilla:master Aug 9, 2018
Mardak pushed a commit to Mardak/activity-stream that referenced this pull request Aug 15, 2018
Fix Bug 1480513 : part 2 - add telemetry for search shortcut
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants