Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit f731e9a

Browse files
feat(customResourceURL): adds possibility to add custom analytics url
due to country restrictions, it's necessary to add a custom url to load analytics closes #155
1 parent f3fae47 commit f731e9a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default () => {
1313

1414
const { disableScriptLoader: noScript } = config
1515
const filename = config.debug.enabled ? 'analytics_debug' : 'analytics'
16-
const resource = `https://www.google-analytics.com/${filename}.js`
16+
const resource = config.customResourceURL || `https://www.google-analytics.com/${filename}.js`
1717

1818
if (!config.id) {
1919
throw new Error(

src/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const defaultConfig = {
1313
// https://github.com/MatteoGabriele/vue-analytics/issues/103
1414
disabled: false,
1515

16+
customResourceURL: null,
17+
1618
set: [],
1719
require: [],
1820

0 commit comments

Comments
 (0)