Vuejs GTM DataLayer

if (this.$gtm.enabled()) {
  window.dataLayer?.push({
    event: "myEvent",
    // further parameters
  });
}