Skip to content
Snippets Groups Projects

Upsell the GitLab Terraform feature - tracking

All threads resolved!
Files
2
@@ -3,6 +3,9 @@ import { GlBanner } from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper';
import { setCookie } from '~/lib/utils/common_utils';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
const trackingMixin = Tracking.mixin({ label: 'terraform_banner' });
export default {
name: 'TerraformNotification',
@@ -16,6 +19,7 @@ export default {
components: {
GlBanner,
},
mixins: [trackingMixin],
inject: ['terraformImagePath', 'bannerDismissedKey'],
data() {
return {
@@ -31,6 +35,10 @@ export default {
handleClose() {
setCookie(this.bannerDismissedKey, true);
this.isVisible = false;
this.track('dismiss_banner');
},
buttonClick() {
this.track('click_button');
},
},
};
@@ -43,6 +51,7 @@ export default {
:button-link="docsUrl"
:svg-path="terraformImagePath"
variant="promotion"
@primary="buttonClick"
@close="handleClose"
>
<p>{{ $options.i18n.description }}</p>
Loading