Commit 237dc760 authored by Dallas Reedy's avatar Dallas Reedy

Implement Product Intelligence suggestions; Tighten up tracking

- Use `action` instead of `event`
- Re-use existing `property` value rather than repeating the same one
  twice
parent 17d37a24
...@@ -9,7 +9,7 @@ const RESIZE_EVENT_DEBOUNCE_MS = 150; ...@@ -9,7 +9,7 @@ const RESIZE_EVENT_DEBOUNCE_MS = 150;
export default { export default {
tracking: { tracking: {
event: 'click_button', action: 'click_button',
labels: { upgrade: 'upgrade_to_ultimate', compare: 'compare_all_plans' }, labels: { upgrade: 'upgrade_to_ultimate', compare: 'compare_all_plans' },
property: 'experiment:highlight_paid_features_during_active_trial', property: 'experiment:highlight_paid_features_during_active_trial',
}, },
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
onShown() { onShown() {
this.track('popover_shown', { this.track('popover_shown', {
label: `feature_highlight_popover:${this.featureName}`, label: `feature_highlight_popover:${this.featureName}`,
property: 'experiment:highlight_paid_features_during_active_trial', property: this.$options.tracking.property,
}); });
}, },
updateDisabledState() { updateDisabledState() {
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
class="gl-mb-0" class="gl-mb-0"
block block
data-testid="upgradeBtn" data-testid="upgradeBtn"
:data-track-event="$options.tracking.event" :data-track-action="$options.tracking.action"
:data-track-label="$options.tracking.labels.upgrade" :data-track-label="$options.tracking.labels.upgrade"
:data-track-property="$options.tracking.property" :data-track-property="$options.tracking.property"
> >
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
class="gl-mb-0" class="gl-mb-0"
block block
data-testid="compareBtn" data-testid="compareBtn"
:data-track-event="$options.tracking.event" :data-track-action="$options.tracking.action"
:data-track-label="$options.tracking.labels.compare" :data-track-label="$options.tracking.labels.compare"
:data-track-property="$options.tracking.property" :data-track-property="$options.tracking.property"
> >
......
...@@ -163,7 +163,7 @@ describe('PaidFeatureCalloutPopover', () => { ...@@ -163,7 +163,7 @@ describe('PaidFeatureCalloutPopover', () => {
variant: 'confirm', variant: 'confirm',
size: 'small', size: 'small',
block: '', block: '',
'data-track-event': 'click_button', 'data-track-action': 'click_button',
'data-track-label': 'upgrade_to_ultimate', 'data-track-label': 'upgrade_to_ultimate',
'data-track-property': 'experiment:highlight_paid_features_during_active_trial', 'data-track-property': 'experiment:highlight_paid_features_during_active_trial',
}); });
...@@ -180,7 +180,7 @@ describe('PaidFeatureCalloutPopover', () => { ...@@ -180,7 +180,7 @@ describe('PaidFeatureCalloutPopover', () => {
variant: 'confirm', variant: 'confirm',
size: 'small', size: 'small',
block: '', block: '',
'data-track-event': 'click_button', 'data-track-action': 'click_button',
'data-track-label': 'compare_all_plans', 'data-track-label': 'compare_all_plans',
'data-track-property': 'experiment:highlight_paid_features_during_active_trial', 'data-track-property': 'experiment:highlight_paid_features_during_active_trial',
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment