Skip to content

Commit 0026595

Browse files
author
baylee-d
authored
Merge pull request #1026 from baylee-d/feature/add-collection-provider-to-analytics
[ENG-1135] Update collections analytics to include provider
2 parents 6ffc07a + 88fa914 commit 0026595

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

lib/app-components/addon/components/branded-navbar/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<li>
4444
{{#link-to
4545
'provider.submit'
46-
click=(action 'click' 'link' (concat 'Navbar - ' (t @addLinkKey)) target=this.analytics)
46+
click=(action 'click' 'link' (concat 'Navbar - ' (t @addLinkKey) ' - ' this.theme.id) target=this.analytics)
4747
}}
4848
<span role='button'>{{t @addLinkKey}}</span>
4949
{{/link-to}}

lib/collections/addon/components/collection-search-result/node/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div
22
data-test-collection-search-result-node={{this.item.id}}
3-
data-analytics-scope='Collections search results'
3+
data-analytics-scope={{concat 'Collections search results - ' this.theme.id}}
44
class='row'
55
>
66
<div class='col-xs-12'>

lib/collections/addon/components/discover-page/component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,7 @@ export default class DiscoverPage extends Component {
338338

339339
@action
340340
clearFilters() {
341-
this.analytics.track('button', 'click', 'Discover - Clear Filters');
342-
341+
this.analytics.track('button', 'click', `Discover - Clear Filters - ${this.theme.id}`);
343342
if (this.facetContexts) {
344343
// Clear all of the activeFilters
345344
this.facetContexts
@@ -366,7 +365,7 @@ export default class DiscoverPage extends Component {
366365
@action
367366
searchAction() {
368367
// Only want to track search here when button clicked. Keypress search tracking is debounced in trackSearch
369-
this.analytics.track('button', 'click', 'Discover - Search', this.q);
368+
this.analytics.track('button', 'click', `Discover - Search - ${this.theme.id}`, this.q);
370369
this.search();
371370
}
372371

lib/collections/addon/components/discover-page/facets/checklist/component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default abstract class SearchFacetChecklist extends Base {
7474
didInsertElement(this: SearchFacetChecklist) {
7575
super.didInsertElement();
7676

77-
const { analytics, context, filterChanged, filterProperty } = this;
77+
const { analytics, context, filterChanged, filterProperty, theme } = this;
7878

7979
setProperties(context, {
8080
updateFilters(item?: string) {
@@ -84,7 +84,11 @@ export default abstract class SearchFacetChecklist extends Base {
8484
const method = activeFilter.includes(item) ? 'removeObject' : 'pushObject';
8585
activeFilter[method](item);
8686
const filterAction = method === 'removeObject' ? 'remove' : 'add';
87-
analytics.track('filter', filterAction, `Collections Discover - Filter ${context.title} ${item}`);
87+
analytics.track(
88+
'filter',
89+
filterAction,
90+
`Discover - Filter ${context.title} ${item} - ${theme.id}`,
91+
);
8892
}
8993

9094
setProperties(context, {

0 commit comments

Comments
 (0)