diff --git a/src/components/Tiers.vue b/src/components/Tiers.vue
index 317f0451..9afd6510 100644
--- a/src/components/Tiers.vue
+++ b/src/components/Tiers.vue
@@ -4,6 +4,9 @@
+
+ Pay annually (save 10%)
+
{{ t.price }}{{ t.name === "Free" ? t.price : `$${price(t.price)}` }}
- ${{ discountPrice(t.price) }}
forever
@@ -112,12 +115,12 @@
Join {{ t.price }} tierJoin {{ `$${price(t.price)}` }} tier
@@ -155,6 +158,7 @@ export default {
loading: true,
show_storage: false,
discount: undefined,
+ annually: false,
default_benefits: [
"Combat tracker",
"Encounter builder",
@@ -205,13 +209,18 @@ export default {
},
selectTier(t) {
this.$gtm.trackEvent({
- event: "subscribe",
+ event: "purchase",
tier: t.name,
+ cadence: this.annually ? 12 : 1,
});
},
setDiscount(discount) {
this.discount = discount;
},
+ price(price) {
+ price = Number(price.slice(1));
+ return this.annually ? (price * 0.9).toFixed(2) : price;
+ },
discountPrice(price) {
price = Number(price.slice(1));
return (price * (1 - this.discount / 100)).toFixed(2);