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

Commit

Permalink
feat(customResourceURL): adds possibility to add custom analytics url
Browse files Browse the repository at this point in the history
due to country restrictions, it's necessary to add a custom url to load analytics

closes #155
  • Loading branch information
MatteoGabriele committed Aug 25, 2018
1 parent f3fae47 commit f731e9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default () => {

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

if (!config.id) {
throw new Error(
Expand Down
2 changes: 2 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const defaultConfig = {
// https://github.com/MatteoGabriele/vue-analytics/issues/103
disabled: false,

customResourceURL: null,

set: [],
require: [],

Expand Down

0 comments on commit f731e9a

Please sign in to comment.