Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
82d6ae29
Commit
82d6ae29
authored
May 12, 2020
by
Roman Kuba
Committed by
Natalia Tepluhina
May 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tracking keys based on product feedback
parent
8f803264
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
app/assets/javascripts/design_management/pages/design/index.vue
...sets/javascripts/design_management/pages/design/index.vue
+2
-0
app/assets/javascripts/design_management/utils/tracking.js
app/assets/javascripts/design_management/utils/tracking.js
+10
-4
spec/frontend/design_management/utils/tracking_spec.js
spec/frontend/design_management/utils/tracking_spec.js
+7
-5
No files found.
app/assets/javascripts/design_management/pages/design/index.vue
View file @
82d6ae29
...
...
@@ -259,8 +259,10 @@ export default {
});
},
trackEvent
()
{
// TODO: This needs to be made aware of referers, or if it's rendered in a different context than a Issue
trackDesignDetailView
(
'
issue-design-collection
'
,
'
issue
'
,
this
.
$route
.
query
.
version
||
this
.
latestVersionId
,
this
.
isLatestVersion
,
);
...
...
app/assets/javascripts/design_management/utils/tracking.js
View file @
82d6ae29
...
...
@@ -4,8 +4,9 @@ function assembleDesignPayload(payloadArr) {
return
{
value
:
{
'
internal-object-refrerer
'
:
payloadArr
[
0
],
'
version-number
'
:
payloadArr
[
1
],
'
current-version
'
:
payloadArr
[
2
],
'
design-collection-owner
'
:
payloadArr
[
1
],
'
design-version-number
'
:
payloadArr
[
2
],
'
design-is-current-version
'
:
payloadArr
[
3
],
},
};
}
...
...
@@ -14,9 +15,14 @@ function assembleDesignPayload(payloadArr) {
const
DESIGN_TRACKING_PAGE_NAME
=
'
projects:issues:design
'
;
// eslint-disable-next-line import/prefer-default-export
export
function
trackDesignDetailView
(
refrerer
=
''
,
designVersion
=
1
,
latestVersion
=
false
)
{
export
function
trackDesignDetailView
(
referer
=
''
,
owner
=
''
,
designVersion
=
1
,
latestVersion
=
false
,
)
{
Tracking
.
event
(
DESIGN_TRACKING_PAGE_NAME
,
'
design_viewed
'
,
{
label
:
'
design_viewed
'
,
...
assembleDesignPayload
([
ref
rer
er
,
designVersion
,
latestVersion
]),
...
assembleDesignPayload
([
ref
erer
,
own
er
,
designVersion
,
latestVersion
]),
});
}
spec/frontend/design_management/utils/tracking_spec.js
View file @
82d6ae29
...
...
@@ -22,8 +22,9 @@ describe('Tracking Events', () => {
label
:
eventName
,
value
:
{
'
internal-object-refrerer
'
:
''
,
'
version-number
'
:
1
,
'
current-version
'
:
false
,
'
design-collection-owner
'
:
''
,
'
design-version-number
'
:
1
,
'
design-is-current-version
'
:
false
,
},
}),
);
...
...
@@ -32,7 +33,7 @@ describe('Tracking Events', () => {
it
(
'
trackDesignDetailView allows to customize the value payload
'
,
()
=>
{
const
trackingSpy
=
getTrackingSpy
(
eventKey
);
trackDesignDetailView
(
'
from-a-test
'
,
100
,
true
);
trackDesignDetailView
(
'
from-a-test
'
,
'
test
'
,
100
,
true
);
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
eventKey
,
...
...
@@ -41,8 +42,9 @@ describe('Tracking Events', () => {
label
:
eventName
,
value
:
{
'
internal-object-refrerer
'
:
'
from-a-test
'
,
'
version-number
'
:
100
,
'
current-version
'
:
true
,
'
design-collection-owner
'
:
'
test
'
,
'
design-version-number
'
:
100
,
'
design-is-current-version
'
:
true
,
},
}),
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment