diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index 7a34ec3..fbd2f8c 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -612,9 +612,7 @@ export class AboutComponent { } ngOnInit() { - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); - } + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe()); this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); this.updateUrl(this.url); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f1f6ed9..857501a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -22,6 +22,7 @@ import {AlertModal} from "./openaireLibrary/utils/modal/alert"; import {StakeholderEntities} from './openaireLibrary/monitor/entities/stakeholder'; import {ResourcesService} from "./openaireLibrary/monitor/services/resources.service"; import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; +import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service"; @Component({ selector: 'app-root', @@ -101,6 +102,7 @@ export class AppComponent { public stakeholderEntities = StakeholderEntities; constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, + private configurationService: ConfigurationService, private router: Router, private stakeholderService: StakeholderService, private smoothScroll: SmoothScroll, private userManagementService: UserManagementService, private quickContactService: QuickContactService, @@ -118,6 +120,7 @@ export class AppComponent { } ngOnInit() { + this.configurationService.initPortal(this.properties, "monitor"); this.userManagementService.fixRedirectURL = properties.afterLoginRedirectLink; this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { this.user = user; diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index f1ff45d..5802f6e 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -57,9 +57,7 @@ export class ContactComponent implements OnInit { } ngOnInit() { - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); - } + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe()); this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); this.updateUrl(this.url); diff --git a/src/app/get-started/get-started.component.ts b/src/app/get-started/get-started.component.ts index 855fe27..4b6f8da 100644 --- a/src/app/get-started/get-started.component.ts +++ b/src/app/get-started/get-started.component.ts @@ -60,9 +60,7 @@ export class GetStartedComponent implements OnInit { } ngOnInit() { - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); - } + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe()); this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); this.updateUrl(this.url); diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 281b04a..131fbf5 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -107,9 +107,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv let url = this.properties.domain + this.properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(url, false); this._meta.updateTag({content: url}, "property='og:url'"); - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Monitor", this.properties.piwikSiteId).subscribe()); - } + this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Monitor").subscribe()); this.getNumbers(); this.subscriptions.push(this.localStorageService.get().subscribe(value => { this.directLink = value; diff --git a/src/app/my-stakeholders/my-stakeholders.component.ts b/src/app/my-stakeholders/my-stakeholders.component.ts index 30195bb..25b7a7e 100644 --- a/src/app/my-stakeholders/my-stakeholders.component.ts +++ b/src/app/my-stakeholders/my-stakeholders.component.ts @@ -64,9 +64,7 @@ export class MyStakeholdersComponent { var url = this.properties.domain + this.properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(url, false); this._meta.updateTag({content: url}, "property='og:url'"); - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe()); - } + this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe()); this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { this.user = user; if (this.user) { diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 1785da3..46b3e93 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 1785da3c45eab2438f014f6e5149c1e995bd7bff +Subproject commit 46b3e937bf7b01cd0593cb256c574fb7d21255f7 diff --git a/src/app/search-stakeholders/search-stakeholders.component.ts b/src/app/search-stakeholders/search-stakeholders.component.ts index 5a3161a..6a82e17 100644 --- a/src/app/search-stakeholders/search-stakeholders.component.ts +++ b/src/app/search-stakeholders/search-stakeholders.component.ts @@ -22,7 +22,7 @@ import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sideb selector: 'search-stakeholders', template: ` { this.searchPage.resultsPerPage = 10; diff --git a/src/app/support/support.component.ts b/src/app/support/support.component.ts index 2842108..0f22fac 100644 --- a/src/app/support/support.component.ts +++ b/src/app/support/support.component.ts @@ -36,9 +36,7 @@ export class SupportComponent { } public ngOnInit() { - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); - } + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe()); this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); this.updateUrl(this.url);