Skip to content

Load experiments via tracking options on runtime

What does this MR do?

Related to #328008 (closed)

There was no clear indication for providing tracking options on runtime on Vue, this MRs tries to make it clear in our docs.

It also cleans up the original use case for the related issue:

created() {
  // `this.experiment` was provided at runtime
  const trackingMixin = Tracking.mixin({ experiment: this.experiment });
  // To mimic the "update" of the mixin logic, a new instance was created
  const trackingInstance = new Vue({
    ...trackingMixin,
    render() {
      return null;
    },
  });
  this.track = trackingInstance.track;
},

The case above could have been solved by:

computed: {
  tracking() {
    return { experiment: this.experiment },
  },
},

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Axel García

Merge request reports

Loading