summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordstull <dstull@gitlab.com>2019-08-13 13:31:40 -0400
committerdstull <dstull@gitlab.com>2019-08-13 14:44:55 -0400
commit65b82e5b75e3dfaa9393939f08b90cf9affcc7d8 (patch)
tree496ad90acd72b06dfddb5f57e7690ab9d921914f
parent76b345105a252a507c7993c95ab5f71316a89108 (diff)
downloadgitlab-ce-ce-add-pendo-snippet.tar.gz
Add pendo tracking code backport from eece-add-pendo-snippet
- This needs to be added in order to satisfy the idea of keeping the ce/ee codebases as much in line as possible. The pendo code will not be used in this codebase.
-rw-r--r--app/views/layouts/_head.html.haml1
-rw-r--r--config/initializers/1_settings.rb1
-rw-r--r--spec/spec_helper.rb6
3 files changed, 8 insertions, 0 deletions
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 271b73326fa..85c8192e855 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -79,3 +79,4 @@
= render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id')
= render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id')
= render_if_exists 'layouts/snowplow'
+ = render_if_exists 'layouts/pendo' if Feature.enabled?(:pendo_tracking)
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 828732126b6..afec16228d5 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -209,6 +209,7 @@ Gitlab.ee do
Settings.gitlab['mirror_max_delay'] ||= 300
Settings.gitlab['mirror_max_capacity'] ||= 30
Settings.gitlab['mirror_capacity_threshold'] ||= 15
+ Settings.gitlab['pendo_api_key'] ||= ENV['GITLAB_PENDO_API_KEY']
end
#
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index bcc133790d1..1a930886411 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -145,6 +145,12 @@ RSpec.configure do |config|
.with(:force_autodevops_on_by_default, anything)
.and_return(false)
+ # Disable Pendo tracking features by default as we do not want tests to send
+ # data to Pendo.
+ # Once we move away from Feature flag use for Pendo into using our built in
+ # feature flag setup, we can remove this.
+ stub_feature_flags(pendo_tracking: false)
+
Gitlab::ThreadMemoryCache.cache_backend.clear
end