Removed vue-analytics and update all code refs.

This commit is contained in:
2020-11-24 23:50:00 +01:00
parent ea1237464d
commit edd09c012c
8 changed files with 6 additions and 14 deletions

View File

@@ -32,7 +32,6 @@
</template> </template>
<script> <script>
import { page, event } from "vue-analytics";
import Banner from "@/ui/Banner"; import Banner from "@/ui/Banner";
import Wine from "@/ui/Wine"; import Wine from "@/ui/Wine";
import { overallWineStatistics } from "@/api"; import { overallWineStatistics } from "@/api";

View File

@@ -13,7 +13,6 @@
</template> </template>
<script> <script>
import { page, event } from "vue-analytics";
import RaffleGenerator from "@/ui/RaffleGenerator"; import RaffleGenerator from "@/ui/RaffleGenerator";
import Vipps from "@/ui/Vipps"; import Vipps from "@/ui/Vipps";
import Countdown from "@/ui/Countdown"; import Countdown from "@/ui/Countdown";
@@ -44,7 +43,7 @@ export default {
this.hardStart = true; this.hardStart = true;
}, },
track() { track() {
this.$ga.page("/lottery/generate"); window.ga('send', 'pageview', '/lottery/generate');
} }
} }
}; };

View File

@@ -8,7 +8,6 @@
</template> </template>
<script> <script>
import { page, event } from "vue-analytics";
import { prelottery } from "@/api"; import { prelottery } from "@/api";
import Banner from "@/ui/Banner"; import Banner from "@/ui/Banner";
import Wine from "@/ui/Wine"; import Wine from "@/ui/Wine";

View File

@@ -66,7 +66,6 @@
</template> </template>
<script> <script>
import { page, event } from "vue-analytics";
import PurchaseGraph from "@/ui/PurchaseGraph"; import PurchaseGraph from "@/ui/PurchaseGraph";
import TotalBought from "@/ui/TotalBought"; import TotalBought from "@/ui/TotalBought";
import Highscore from "@/ui/Highscore"; import Highscore from "@/ui/Highscore";
@@ -121,7 +120,7 @@ export default {
this.hardStart = way; this.hardStart = way;
}, },
track() { track() {
this.$ga.page("/"); window.ga('send', 'pageview', '/');
}, },
startCountdown() { startCountdown() {
this.hardStart = true; this.hardStart = true;

View File

@@ -55,7 +55,6 @@
</template> </template>
<script> <script>
import { page, event } from "vue-analytics";
import { attendees, winners, getChatHistory, prelottery } from "@/api"; import { attendees, winners, getChatHistory, prelottery } from "@/api";
import Chat from "@/ui/Chat"; import Chat from "@/ui/Chat";
import Vipps from "@/ui/Vipps"; import Vipps from "@/ui/Vipps";

View File

@@ -112,13 +112,11 @@ export default {
this.emitColors() this.emitColors()
if (window.location.hostname == "localhost") { window.ga('send', {
return; hitType: "event",
}
this.$ga.event({
eventCategory: "Raffles", eventCategory: "Raffles",
eventAction: "Generate", eventAction: "Generate",
eventValue: JSON.stringify(this.colors) eventLabel: JSON.stringify(this.colors)
}); });
return; return;
} }

View File

@@ -24,7 +24,6 @@
</template> </template>
<script> <script>
import { event } from "vue-analytics";
import Wine from "@/ui/Wine"; import Wine from "@/ui/Wine";
import { overallWineStatistics } from "@/api"; import { overallWineStatistics } from "@/api";

View File

@@ -1,4 +1,4 @@
const dateString = (date) => { const dateString = (date) => {
if (typeof(date) == "string") { if (typeof(date) == "string") {
date = new Date(date); date = new Date(date);