fix(analytics): move lfp events out of mounted

This commit is contained in:
SabreCat
2023-05-02 16:52:50 -05:00
parent 13e87b1ea0
commit c77dd5f200
4 changed files with 17 additions and 14 deletions

View File

@@ -122,6 +122,7 @@
<script>
import orderBy from 'lodash/orderBy';
import * as Analytics from '@/libs/analytics';
import { mapGetters, mapActions } from '@/libs/store';
import MemberDetails from '../memberDetails';
import createPartyModal from '../groups/createPartyModal';
@@ -237,6 +238,12 @@ export default {
this.$router.push('/looking-for-party');
} else {
this.$root.$emit('bv::show::modal', 'create-party-modal');
Analytics.track({
eventName: 'Start a Party button',
eventAction: 'Start a Party button',
eventCategory: 'behavior',
hitType: 'event',
}, { trackOnClient: true });
}
},
loadMembers (payload = null) {