Skip to content

Commit e5e433f

Browse files
committed
remove countly metrics dependency
Signed-off-by: Dave Huseby <[email protected]>
1 parent 71fc2f6 commit e5e433f

17 files changed

+9
-290
lines changed

src/.vuepress/theme/components/Footer.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
:key="'link-' + index"
1313
class="sm:mr-10 last:mr-0"
1414
:class="[{ 'mb-4': item.children && item.children.length }]"
15-
@click="onlinkClick(item)"
1615
>
1716
<NavLink
1817
:item="item"
@@ -26,7 +25,6 @@
2625
v-for="(childItem, childIndex) in item.children"
2726
:key="'link-child' + childIndex"
2827
class="mb-2 last:mb-0"
29-
@click="onlinkClick(item)"
3028
>
3129
<NavLink
3230
:item="childItem"
@@ -50,8 +48,6 @@ import SocialLinks from '@theme/components/SocialLinks'
5048
import FooterLegal from '@theme/components/FooterLegal'
5149
import NavLink from '@theme/components/NavLink.vue'
5250
53-
import countly from '../util/countly'
54-
5551
export default {
5652
name: 'Footer',
5753
components: { SocialLinks, NavLink, FooterLegal },
@@ -60,15 +56,7 @@ export default {
6056
return this.$themeLocaleConfig.footerLinks
6157
},
6258
},
63-
methods: {
64-
onlinkClick(item) {
65-
countly.trackEvent(countly.events.LINK_CLICK_FOOTER, {
66-
path: this.$route.path,
67-
text: item.text,
68-
href: item.link,
69-
})
70-
},
71-
},
59+
methods: {},
7260
}
7361
</script>
7462

src/.vuepress/theme/components/FooterLegal.vue

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
href="https://protocol.ai"
66
target="_blank"
77
class="mr-1 inline-block align-middle"
8-
@click="(event) => onLinkClick(event, true)"
98
>
109
<SVGIcon
1110
name="logo-icon"
@@ -18,46 +17,40 @@
1817
class="text-blueGreenLight hover:underline"
1918
href="https://protocol.ai"
2019
target="_blank"
21-
@click="onLinkClick"
2220
>Protocol Labs</a
2321
>
2422
| Except as
2523
<a
2624
class="text-blueGreenLight hover:underline"
2725
href="https://protocol.ai/legal/"
2826
target="_blank"
29-
@click="onLinkClick"
3027
>noted</a
3128
>, content licensed
3229
<a
3330
class="text-blueGreenLight hover:underline"
3431
href="https://creativecommons.org/licenses/by/3.0/"
3532
target="_blank"
36-
@click="onLinkClick"
3733
>CC-BY 3.0</a
3834
>
3935
|
4036
<a
4137
class="text-blueGreenLight hover:underline"
4238
href="https://protocol.ai/legal/#terms-of-service"
4339
target="_blank"
44-
@click="onLinkClick"
4540
>Terms</a
4641
>
4742
|
4843
<a
4944
class="text-blueGreenLight hover:underline"
5045
href="https://protocol.ai/legal/#privacy-policy"
5146
target="_blank"
52-
@click="onLinkClick"
5347
>Privacy</a
5448
>
5549
|
5650
<a
5751
class="text-blueGreenLight hover:underline"
5852
href="https://ipfs.tech/legal/"
5953
target="_blank"
60-
@click="onLinkClick"
6154
>DMCA</a
6255
></span
6356
>
@@ -67,27 +60,9 @@
6760
<script>
6861
import SVGIcon from '@theme/components/base/SVGIcon.vue'
6962
70-
import countly from '../util/countly'
71-
7263
export default {
7364
name: 'FooterLegal',
7465
components: { SVGIcon },
75-
methods: {
76-
onLinkClick(event, isSvg) {
77-
const href = isSvg
78-
? event.srcElement.parentElement.href
79-
: event.srcElement.href
80-
81-
const text = isSvg
82-
? event.srcElement.firstChild.textContent
83-
: event.srcElement.text
84-
85-
countly.trackEvent(countly.events.LINK_CLICK_FOOTER, {
86-
view: this.$route.path,
87-
text: text.trim(),
88-
href: href,
89-
})
90-
},
91-
},
66+
methods: { },
9267
}
9368
</script>

src/.vuepress/theme/components/MobileNav.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<Link
1919
class="mobile-nav__link type-h1"
2020
:item="page"
21-
:on-click="onClickNavLink"
2221
/>
2322
</li>
2423
</ul>
@@ -37,8 +36,6 @@ import SocialLinks from '@theme/components/SocialLinks'
3736
import Link from '@theme/components/base/Link'
3837
import trapFocus from '@theme/util/trapFocus'
3938
40-
import countly from '../util/countly'
41-
4239
export default {
4340
name: 'MobileNav',
4441
components: {
@@ -89,13 +86,6 @@ export default {
8986
afterEnter() {
9087
this.setTabItems()
9188
},
92-
onClickNavLink(item) {
93-
countly.trackEvent(countly.events.LINK_CLICK_NAV, {
94-
view: this.$route.path,
95-
href: item.link,
96-
text: item.text,
97-
})
98-
},
9989
},
10090
}
10191
</script>

src/.vuepress/theme/components/Nav.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
<Link
3636
class="nav__link font-display font-medium"
3737
:item="page"
38-
:on-click="onClickNavLink"
3938
/>
4039
</li>
4140
</ul>
@@ -57,8 +56,6 @@ import { mapState } from 'vuex'
5756
import SVGIcon from '@theme/components/base/SVGIcon'
5857
import Link from '@theme/components/base/Link'
5958
60-
import countly from '../util/countly'
61-
6259
export default {
6360
name: 'Nav',
6461
components: {
@@ -137,13 +134,6 @@ export default {
137134
toggleMobileMenu() {
138135
this.$store.commit('appState/toggleMobileNav', !this.mobileNavActive)
139136
},
140-
onClickNavLink(item) {
141-
countly.trackEvent(countly.events.LINK_CLICK_NAV, {
142-
view: this.$route.path,
143-
href: item.link,
144-
text: item.text,
145-
})
146-
},
147137
},
148138
}
149139
</script>

src/.vuepress/theme/components/SocialLinks.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
:href="link.link"
88
target="_blank"
99
rel="noopener noreferrer"
10-
@click="socialLinkClick(link)"
1110
>
1211
<SVGIcon
1312
class="w-8 h-8 fill-current hover:opacity-75 transition transition-opacity duration-300 ease-in-out"
@@ -20,8 +19,6 @@
2019
<script>
2120
import SVGIcon from '@theme/components/base/SVGIcon'
2221
23-
import countly from '../util/countly'
24-
2522
export default {
2623
name: 'SocialLinks',
2724
components: { SVGIcon },
@@ -30,14 +27,6 @@ export default {
3027
return this.$themeLocaleConfig.socialLinks
3128
},
3229
},
33-
methods: {
34-
socialLinkClick(link) {
35-
countly.trackEvent(countly.events.SOCIAL_MEDIA_OUTBOUNDS, {
36-
view: this.$route.path,
37-
text: link.text,
38-
link: link.link,
39-
})
40-
},
41-
},
30+
methods: {},
4231
}
4332
</script>
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<script>
22
import RSSSubscription from '@theme/components/RSSSubscription.vue'
33
4-
import countly from '../../util/countly'
5-
64
export default {
75
name: 'LinksAndSocial',
86
components: {
@@ -15,13 +13,6 @@ export default {
1513
},
1614
},
1715
computed: {},
18-
methods: {
19-
trackSubmitItem() {
20-
countly.trackEvent(countly.events.LINK_CLICK_SUBMIT_ITEM)
21-
},
22-
trackPressKit() {
23-
countly.trackEvent(countly.events.LINK_CLICK_PRESS_KIT)
24-
},
25-
},
16+
methods: {},
2617
}
2718
</script>
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<script>
22
import { mapState } from 'vuex'
33
4-
import countly from '../../util/countly'
5-
64
export default {
75
name: 'NewsletterForm',
86
props: {},
@@ -12,10 +10,6 @@ export default {
1210
computed: {
1311
...mapState('appState', ['latestWeeklyPost']),
1412
},
15-
methods: {
16-
subscribeClick() {
17-
countly.trackEvent(countly.events.NEWSLETTER_SUBSCRIBE)
18-
},
19-
},
13+
methods: {},
2014
}
2115
</script>

src/.vuepress/theme/components/blog/PostAuthor.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
<script>
2929
import { mapState } from 'vuex'
30-
import countly from '../../util/countly'
3130
3231
export default {
3332
name: 'PostAuthor',
@@ -57,13 +56,6 @@ export default {
5756
},
5857
methods: {
5958
handleAuthorClick(author) {
60-
const authorTracking = {
61-
author: author.name,
62-
method: `${this.parent}-select`,
63-
}
64-
65-
countly.trackEvent(countly.events.FILTER, authorTracking)
66-
6759
this.$store.commit('appState/setActiveAuthor', author)
6860
},
6961
},

src/.vuepress/theme/components/blog/PostMeta.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ import PostTag from '@theme/components/blog/PostTag'
5656
import PostAuthor from '@theme/components/blog/PostAuthor'
5757
import PostMetaTitle from '@theme/components/blog/PostMetaTitle'
5858
import UnstyledLink from '@theme/components/UnstyledLink'
59-
import countly from '../../util/countly'
6059
6160
export default {
6261
name: 'PostMeta',
@@ -113,13 +112,6 @@ export default {
113112
},
114113
methods: {
115114
handleCatClick() {
116-
const categoryTracking = {
117-
category: this.category.name,
118-
method: 'card-select',
119-
}
120-
121-
countly.trackEvent(countly.events.FILTER, categoryTracking)
122-
123115
this.$store.commit('appState/setActiveCategory', this.category)
124116
},
125117
},

src/.vuepress/theme/components/blog/PostSocials.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
hashtags=""
1212
:twitter-user="social.twitterHandle"
1313
class="mr-1 last:mr-0"
14-
@open="shareClick(social)"
1514
>
1615
<SVGIcon
1716
class="w-6 h-6 opacity-50 fill-current text-blueGreen hover:opacity-100 transition transition-opacity duration-300 ease-in-out"
@@ -24,8 +23,6 @@
2423
<script>
2524
import SVGIcon from '@theme/components/base/SVGIcon'
2625
27-
import countly from '../../util/countly'
28-
2926
export default {
3027
name: 'PostSocials',
3128
components: { SVGIcon },
@@ -60,13 +57,6 @@ export default {
6057
this.currentUrl = window.location.href
6158
this.host = window.location.host
6259
},
63-
methods: {
64-
shareClick(social) {
65-
countly.trackEvent(countly.events.SOCIAL_MEDIA_SHARE, {
66-
view: this.$route.path,
67-
text: social.text,
68-
})
69-
},
70-
},
60+
methods: {},
7161
}
7262
</script>

src/.vuepress/theme/components/blog/PostTag.vue

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@
44
:to="{ path: $localePath, query: { tags: tag.slug } }"
55
:class="computedClass"
66
rel="nofollow"
7-
@click.native="handleTagClick"
87
>
98
#{{ tag.name }}
109
</router-link>
11-
<button v-else :class="computedClass" @click="addNewTag">
10+
<button v-else :class="computedClass">
1211
#{{ tag.name }}
1312
</button>
1413
</template>
1514

1615
<script>
17-
import countly from '../../util/countly'
18-
1916
export default {
2017
name: 'PostTag',
2118
props: {
@@ -55,24 +52,6 @@ export default {
5552
]
5653
},
5754
},
58-
methods: {
59-
handleTagClick() {
60-
this.trackTag()
61-
this.$store.commit('appState/setActiveTags', [this.tag.slug])
62-
},
63-
addNewTag() {
64-
this.trackTag()
65-
this.$store.commit('appState/addNewTag', [this.tag.slug])
66-
this.callback()
67-
},
68-
trackTag() {
69-
const tagTracking = {
70-
tag: this.tag.name,
71-
method: `${this.parent}-select`,
72-
}
73-
74-
countly.trackEvent(countly.events.FILTER, tagTracking)
75-
},
76-
},
55+
methods: {},
7756
}
7857
</script>

0 commit comments

Comments
 (0)