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

Commit

Permalink
Removes google ads from codebase, fix analytics (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically authored Mar 8, 2022
1 parent 91b79b7 commit e87d85b
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 607 deletions.
13 changes: 1 addition & 12 deletions components/ads/Advertisement.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
<template>
<div v-if="displayed && !hidden" class="ad-wrapper">
<div class="ad">
<GptAd
:key="format.adUnit"
ref="ad_slot"
:ad-unit="format.adUnit"
:size="format.size"
:is-responsive="true"
/>
</div>
</div>
<div v-else-if="ethical_ads_on">
<div v-if="ethical_ads_on">
<div v-if="ethical_ad_display && ethicalAdType === 'text'">
<div
:class="ethical_ad_style"
Expand Down
22 changes: 9 additions & 13 deletions middleware/analytics.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import axios from 'axios'
export default function (context) {
if (context.$config.analytics.base_url == null) {
if (process.client && context.from.path === context.route.path) {
return
}
let domain = ''
if (process.server) {
domain = context.req.headers.host
} else {
domain = location.host

if (context.$config.analytics.base_url == null) {
return
}
const url = context.$config.analytics.base_url + '/register/visit'
const path = context.route.path.split('?')[0]

setTimeout(() => {
axios
.post(url, {
path,
domain,
context.$axios
.post(`${context.$config.analytics.base_url}/register/visit`, {
path: context.route.path,
domain: process.server ? context.req.headers.host : location.host,
consent: false,
})
.then(() => {})
Expand Down
6 changes: 0 additions & 6 deletions modules/analytics/lib/constants.js

This file was deleted.

24 changes: 0 additions & 24 deletions modules/analytics/lib/module.js

This file was deleted.

37 changes: 0 additions & 37 deletions modules/analytics/lib/templates/plugin.js

This file was deleted.

31 changes: 0 additions & 31 deletions modules/analytics/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions modules/gpt-ads/lib/constants.js

This file was deleted.

39 changes: 0 additions & 39 deletions modules/gpt-ads/lib/module.js

This file was deleted.

Loading

1 comment on commit e87d85b

@vercel
Copy link

@vercel vercel bot commented on e87d85b Mar 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.