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;
export default {
tracking: {
event: 'click_button',
action: 'click_button',
labels: { upgrade: 'upgrade_to_ultimate', compare: 'compare_all_plans' },
property: 'experiment:highlight_paid_features_during_active_trial',
},
......@@ -119,7 +119,7 @@ export default {
onShown() {
this.track('popover_shown', {
label: `feature_highlight_popover:${this.featureName}`,
property: 'experiment:highlight_paid_features_during_active_trial',
property: this.$options.tracking.property,
});
},
updateDisabledState() {
......@@ -163,7 +163,7 @@ export default {
class="gl-mb-0"
block
data-testid="upgradeBtn"
:data-track-event="$options.tracking.event"
:data-track-action="$options.tracking.action"
:data-track-label="$options.tracking.labels.upgrade"
:data-track-property="$options.tracking.property"
>
......@@ -178,7 +178,7 @@ export default {
class="gl-mb-0"
block
data-testid="compareBtn"
:data-track-event="$options.tracking.event"
:data-track-action="$options.tracking.action"
:data-track-label="$options.tracking.labels.compare"
:data-track-property="$options.tracking.property"
>
......
......@@ -163,7 +163,7 @@ describe('PaidFeatureCalloutPopover', () => {
variant: 'confirm',
size: 'small',
block: '',
'data-track-event': 'click_button',
'data-track-action': 'click_button',
'data-track-label': 'upgrade_to_ultimate',
'data-track-property': 'experiment:highlight_paid_features_during_active_trial',
});
......@@ -180,7 +180,7 @@ describe('PaidFeatureCalloutPopover', () => {
variant: 'confirm',
size: 'small',
block: '',
'data-track-event': 'click_button',
'data-track-action': 'click_button',
'data-track-label': 'compare_all_plans',
'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