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
d360a3c8
Commit
d360a3c8
authored
Feb 25, 2022
by
Tyler Williams
Committed by
David O'Regan
Feb 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add import project GTM events to combined form
parent
1b74e49d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
app/assets/javascripts/google_tag_manager/index.js
app/assets/javascripts/google_tag_manager/index.js
+2
-2
ee/app/assets/javascripts/pages/registrations/groups_projects/new/index.js
...ascripts/pages/registrations/groups_projects/new/index.js
+2
-1
ee/app/assets/javascripts/pages/registrations/projects/new/index.js
...ets/javascripts/pages/registrations/projects/new/index.js
+2
-2
spec/frontend/google_tag_manager/index_spec.js
spec/frontend/google_tag_manager/index_spec.js
+4
-4
No files found.
app/assets/javascripts/google_tag_manager/index.js
View file @
d360a3c8
...
...
@@ -150,7 +150,7 @@ export const trackSaasTrialProject = () => {
});
};
export
const
track
SaasTrial
ProjectImport
=
()
=>
{
export
const
trackProjectImport
=
()
=>
{
if
(
!
isSupported
())
{
return
;
}
...
...
@@ -159,7 +159,7 @@ export const trackSaasTrialProjectImport = () => {
importButtons
.
forEach
((
button
)
=>
{
button
.
addEventListener
(
'
click
'
,
()
=>
{
const
{
platform
}
=
button
.
dataset
;
pushEvent
(
'
saasTrialProjectImport
'
,
{
saasProjectImport
:
platform
});
pushEvent
(
'
projectImport
'
,
{
platform
});
});
});
};
...
...
ee/app/assets/javascripts/pages/registrations/groups_projects/new/index.js
View file @
d360a3c8
...
...
@@ -2,8 +2,9 @@
import
mountComponents
from
'
ee/registrations/groups_projects/new
'
;
import
Group
from
'
~/group
'
;
import
{
trackCombinedGroupProjectForm
}
from
'
~/google_tag_manager
'
;
import
{
trackCombinedGroupProjectForm
,
trackProjectImport
}
from
'
~/google_tag_manager
'
;
new
Group
();
mountComponents
();
trackCombinedGroupProjectForm
();
trackProjectImport
();
ee/app/assets/javascripts/pages/registrations/projects/new/index.js
View file @
d360a3c8
import
initProjectVisibilitySelector
from
'
~/projects/project_visibility
'
;
import
initProjectNew
from
'
~/projects/project_new
'
;
import
{
trackSaasTrialProject
,
track
SaasTrial
ProjectImport
}
from
'
~/google_tag_manager
'
;
import
{
trackSaasTrialProject
,
trackProjectImport
}
from
'
~/google_tag_manager
'
;
initProjectVisibilitySelector
();
initProjectNew
.
bindEvents
();
trackSaasTrialProject
();
track
SaasTrial
ProjectImport
();
trackProjectImport
();
spec/frontend/google_tag_manager/index_spec.js
View file @
d360a3c8
...
...
@@ -3,12 +3,12 @@ import { v4 as uuidv4 } from 'uuid';
import
{
trackCombinedGroupProjectForm
,
trackFreeTrialAccountSubmissions
,
trackProjectImport
,
trackNewRegistrations
,
trackSaasTrialSubmit
,
trackSaasTrialSkip
,
trackSaasTrialGroup
,
trackSaasTrialProject
,
trackSaasTrialProjectImport
,
trackSaasTrialGetStarted
,
trackCheckout
,
trackTransaction
,
...
...
@@ -150,20 +150,20 @@ describe('~/google_tag_manager/index', () => {
createTestCase
(
trackSaasTrialProject
,
{
forms
:
[{
id
:
'
new_project
'
,
expectation
:
{
event
:
'
saasTrialProject
'
}
}],
}),
createTestCase
(
track
SaasTrial
ProjectImport
,
{
createTestCase
(
trackProjectImport
,
{
links
:
[
{
id
:
'
js-test-btn-0
'
,
cls
:
'
js-import-project-btn
'
,
attributes
:
{
'
data-platform
'
:
'
bitbucket
'
},
expectation
:
{
event
:
'
saasTrialProjectImport
'
,
saasProjectImport
:
'
bitbucket
'
},
expectation
:
{
event
:
'
projectImport
'
,
platform
:
'
bitbucket
'
},
},
{
// id is neeeded so we trigger the right element in the test
id
:
'
js-test-btn-1
'
,
cls
:
'
js-import-project-btn
'
,
attributes
:
{
'
data-platform
'
:
'
github
'
},
expectation
:
{
event
:
'
saasTrialProjectImport
'
,
saasProjectImport
:
'
github
'
},
expectation
:
{
event
:
'
projectImport
'
,
platform
:
'
github
'
},
},
],
}),
...
...
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