Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit e87d85b

Browse files
Removes google ads from codebase, fix analytics (#403)
1 parent 91b79b7 commit e87d85b

File tree

12 files changed

+10
-607
lines changed

12 files changed

+10
-607
lines changed

components/ads/Advertisement.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
<template>
2-
<div v-if="displayed && !hidden" class="ad-wrapper">
3-
<div class="ad">
4-
<GptAd
5-
:key="format.adUnit"
6-
ref="ad_slot"
7-
:ad-unit="format.adUnit"
8-
:size="format.size"
9-
:is-responsive="true"
10-
/>
11-
</div>
12-
</div>
13-
<div v-else-if="ethical_ads_on">
2+
<div v-if="ethical_ads_on">
143
<div v-if="ethical_ad_display && ethicalAdType === 'text'">
154
<div
165
:class="ethical_ad_style"

middleware/analytics.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
import axios from 'axios'
21
export default function (context) {
3-
if (context.$config.analytics.base_url == null) {
2+
if (process.client && context.from.path === context.route.path) {
43
return
54
}
6-
let domain = ''
7-
if (process.server) {
8-
domain = context.req.headers.host
9-
} else {
10-
domain = location.host
5+
6+
if (context.$config.analytics.base_url == null) {
7+
return
118
}
12-
const url = context.$config.analytics.base_url + '/register/visit'
13-
const path = context.route.path.split('?')[0]
9+
1410
setTimeout(() => {
15-
axios
16-
.post(url, {
17-
path,
18-
domain,
11+
context.$axios
12+
.post(`${context.$config.analytics.base_url}/register/visit`, {
13+
path: context.route.path,
14+
domain: process.server ? context.req.headers.host : location.host,
1915
consent: false,
2016
})
2117
.then(() => {})

modules/analytics/lib/constants.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

modules/analytics/lib/module.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

modules/analytics/lib/templates/plugin.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

modules/analytics/package.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

modules/gpt-ads/lib/constants.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

modules/gpt-ads/lib/module.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)