Skip to content

Commit b6743d9

Browse files
committed
Merge branch 'hotfix/19.7.1'
2 parents 2c803a5 + 99ba45a commit b6743d9

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [19.7.1] - 2019-08-05
8+
### Changed
9+
- Services
10+
- `analytics` - allow passing through of `nonIteraction` flag to Google Analytics
11+
- Modifiers
12+
- `trackScroll` - set `nonInteraction` flag when calling `analytics.trackFromElement()`
13+
- Routes
14+
- `home` - remove version and shorten analytics scope
15+
716
## [19.7.0] - 2019-07-31
817
### Added
918
- Components
@@ -1041,7 +1050,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10411050
### Added
10421051
- Quick Files
10431052

1044-
[Unreleased]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.7.0...HEAD
1053+
[Unreleased]: https://github.com/CenterForOpenScience/ember-osf-web/compare/19.7.1...HEAD
1054+
[19.7.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.7.1
10451055
[19.7.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.7.0
10461056
[19.6.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.6.1
10471057
[19.6.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/19.6.0

app/home/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<main data-analytics-scope='Logged-out homepage - {{this.version}}'>
1+
<main data-analytics-scope='Home'>
22
<Home::-Components::HeroBanner />
33
<Home::-Components::SupportSection />
44
<Home::-Components::Testimonials />

app/modifiers/track-scroll.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class TrackScrollModifier extends Modifier {
2525
name,
2626
category: 'page',
2727
action: 'scroll',
28+
nonInteraction: true,
2829
},
2930
);
3031
this.didShow = true;

app/services/analytics.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ export interface TrackedData {
2323
action?: string;
2424
extra?: string;
2525
label: string;
26+
nonInteraction?: boolean;
2627
}
2728

2829
export interface InitialEventInfo {
2930
name?: string;
3031
category?: string;
3132
action?: string;
3233
extra?: string;
34+
nonInteraction?: boolean;
3335
}
3436

3537
function logEvent(analytics: Analytics, title: string, data: object) {
@@ -58,6 +60,7 @@ class EventInfo {
5860
category?: string;
5961
action?: string;
6062
extra?: string;
63+
nonInteraction?: boolean;
6164

6265
constructor(targetElement: Element, rootElement: Element, initialInfo?: InitialEventInfo) {
6366
if (initialInfo) {
@@ -84,6 +87,7 @@ class EventInfo {
8487
action: this.action,
8588
label: [...this.scopes.reverse(), this.name].join(' - '),
8689
extra: this.extra,
90+
nonInteraction: this.nonInteraction,
8791
};
8892
}
8993

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember-osf-web",
3-
"version": "19.7.0",
3+
"version": "19.7.1",
44
"description": "Ember front-end for the Open Science Framework",
55
"license": "Apache-2.0",
66
"author": "Center for Open Science <support@cos.io>",

tests/integration/analytics-test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module('Integration | Analytics handling', hooks => {
3232
action: 'click',
3333
label: 'Scope! - Button!',
3434
extra: undefined,
35+
nonInteraction: undefined,
3536
}],
3637
], 'One click event');
3738
});
@@ -54,6 +55,7 @@ module('Integration | Analytics handling', hooks => {
5455
action: 'click',
5556
label: 'Scope! - Button!',
5657
extra: 'Foo',
58+
nonInteraction: undefined,
5759
}],
5860
], 'One click event');
5961
});
@@ -74,11 +76,13 @@ module('Integration | Analytics handling', hooks => {
7476
action: 'click',
7577
label: 'Scope! - Button!',
7678
extra: undefined,
79+
nonInteraction: undefined,
7780
}], [{
7881
category: 'button',
7982
action: 'click',
8083
label: 'Scope! - Button!',
8184
extra: undefined,
85+
nonInteraction: undefined,
8286
}],
8387
], 'Two click events');
8488
});
@@ -110,6 +114,7 @@ module('Integration | Analytics handling', hooks => {
110114
action: 'click',
111115
label: 'Scope 1 - Scope 2 - Scope 3 - Button!',
112116
extra: undefined,
117+
nonInteraction: undefined,
113118
}],
114119
], 'One click event with nested scopes');
115120
});
@@ -135,11 +140,13 @@ module('Integration | Analytics handling', hooks => {
135140
action: 'click',
136141
label: 'Scope 1 - Scope 3 - Link!',
137142
extra: undefined,
143+
nonInteraction: undefined,
138144
}], [{
139145
category: 'button',
140146
action: 'click',
141147
label: 'Scope 1 - Scope 2 - Button!',
142148
extra: undefined,
149+
nonInteraction: undefined,
143150
}],
144151
], 'One button, one link');
145152
});
@@ -172,30 +179,35 @@ module('Integration | Analytics handling', hooks => {
172179
action: 'click',
173180
label: 'Scope! - Button!',
174181
extra: undefined,
182+
nonInteraction: undefined,
175183
}],
176184
[{
177185
category: 'link',
178186
action: 'click',
179187
label: 'Scope! - Link!',
180188
extra: undefined,
189+
nonInteraction: undefined,
181190
}],
182191
[{
183192
category: 'button',
184193
action: 'click',
185194
label: 'Scope! - Button link!',
186195
extra: undefined,
196+
nonInteraction: undefined,
187197
}],
188198
[{
189199
category: 'checkbox',
190200
action: 'click',
191201
label: 'Scope! - Checkbox!',
192202
extra: undefined,
203+
nonInteraction: undefined,
193204
}],
194205
[{
195206
category: 'other',
196207
action: 'click',
197208
label: 'Scope! - Other button!',
198209
extra: undefined,
210+
nonInteraction: undefined,
199211
}],
200212
], 'Correct categories');
201213
});

0 commit comments

Comments
 (0)