Angulartics Settings Provider

Add setting which can be set directly through provider.
Use case: you want to strip off the slash in the basePath -- using the
settings in the provider allows you to modify the basePath as you like.
This commit is contained in:
Martin McWhorter
2015-09-09 18:07:21 +01:00
parent 27af392f1b
commit 3c3c84e215
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -20,6 +20,8 @@ module Analytics {
$analyticsProvider.registerPageTrack((path: string, locationObj: ng.ILocationService) => {
console.log("viewed " + path);
});
$analyticsProvider.settings.pageTracking.basePath = "/my/base/path";
}]);
}
+10
View File
@@ -33,6 +33,16 @@ declare module Angulartics {
registerSetUsername(callback: (username: string) => any): void
registerSetUserProperties(callback: (userProperties: any) => any): void
registerSetSuperProperties(callback: (superProperties: any) => any): void
settings: {
pageTracking: {
autoTrackingVirtualPages: boolean,
autoTrackingFirstPage: boolean,
basePath: string,
autoBasePath: boolean
},
developerMode: boolean
}
}
}