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
10694fa0
Commit
10694fa0
authored
Feb 07, 2022
by
Sam Figueroa
Committed by
David O'Regan
Feb 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add structured tracking to ultimate banner
- refs:
https://gitlab.com/gitlab-org/gitlab/-/issues/346644
parent
74ec49dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ee/app/views/shared/_ultimate_trial_callout_content.html.haml
...pp/views/shared/_ultimate_trial_callout_content.html.haml
+4
-3
ee/spec/support/shared_examples/features/ultimate_trial_callout_shared_examples.rb
...amples/features/ultimate_trial_callout_shared_examples.rb
+10
-1
No files found.
ee/app/views/shared/_ultimate_trial_callout_content.html.haml
View file @
10694fa0
-
is_dismissable
=
local_assigns
.
fetch
(
:is_dismissable
,
true
)
-
callout
=
local_assigns
.
fetch
(
:callout
,
Users
::
CalloutsHelper
::
ULTIMATE_TRIAL
)
-
button_css_class
=
is_dismissable
?
'mr-3'
:
''
-
banner_title
=
'ultimate_banner'
.gl-display-none.gl-md-display-block.container-limited
{
class:
'gl-pt-6! gl-pb-2!'
}
.gl-display-none.gl-md-display-block.container-limited
{
class:
'gl-pt-6! gl-pb-2!'
,
data:
{
track_action:
'render'
,
track_label:
banner_title
}
}
.user-callout.promotion-callout.thin-callout.js-gold-trial-callout
{
class:
'gl-mt-0!'
,
data:
{
uid:
'trial_callout_dismissed'
,
feature_id:
callout
,
dismiss_endpoint:
callouts_path
}
}
.gl-card.gl-px-8.gl-py-6
.gl-card-body.gl-display-flex
{
class:
'gl-p-0!'
}
...
...
@@ -13,7 +14,7 @@
%p
%span
=
_
(
'Try all GitLab has to offer for 30 days.'
)
%span
.d-none.d-sm-inline
=
_
(
'No credit card required.'
)
=
link_to
_
(
'Start your free trial'
),
callouts_trials_link_url
,
class:
"btn btn-confirm gl-button mt-2 mt-sm-0
#{
button_css_class
}
"
,
target:
'_blank'
,
rel:
'noopener noreferrer'
=
link_to
_
(
'Start your free trial'
),
callouts_trials_link_url
,
class:
"btn btn-confirm gl-button mt-2 mt-sm-0
#{
button_css_class
}
"
,
target:
'_blank'
,
rel:
'noopener noreferrer'
,
data:
{
track_action:
'click_button'
,
track_label:
'start_your_trial'
,
track_property:
banner_title
}
-
if
is_dismissable
%button
.btn.gl-banner-close.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.close.js-close
{
class:
'gl-opacity-10!'
,
type:
'button'
,
'aria-label'
=>
_
(
'Dismiss trial promotion'
)
}
%button
.btn.gl-banner-close.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.close.js-close
{
class:
'gl-opacity-10!'
,
type:
'button'
,
'aria-label'
=>
_
(
'Dismiss trial promotion'
)
,
data:
{
track_action:
'dismiss_banner'
,
track_label:
banner_title
}
}
=
sprite_icon
(
'close'
,
css_class:
'dismiss-icon gl-text-gray-700!'
)
ee/spec/support/shared_examples/features/ultimate_trial_callout_shared_examples.rb
View file @
10694fa0
...
...
@@ -27,8 +27,17 @@ RSpec.shared_examples 'dashboard ultimate trial callout' do
visit
page_path
expect
(
page
).
to
have_selector
'.promotion-callout'
expect
(
page
).
to
have_selector
(
'[data-track-action=render]'
)
expect
(
page
).
to
have_selector
(
'[data-track-label=ultimate_banner]'
)
find
(
'.promotion-callout .js-close'
).
click
page
.
within
(
'.promotion-callout'
)
do
expect
(
page
).
to
have_selector
(
'[data-track-action=click_button]'
)
expect
(
page
).
to
have_selector
(
'[data-track-label=start_your_trial]'
)
expect
(
page
).
to
have_selector
(
'[data-track-action=dismiss_banner]'
)
expect
(
page
).
to
have_selector
(
'[data-track-label=ultimate_banner]'
)
find
(
'.js-close'
).
click
end
expect
(
page
).
not_to
have_selector
'.promotion-callout'
end
...
...
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