From 4701eae560d7bcb52c1cedc42d1c82c30e125b0e Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 26 Apr 2023 14:27:41 +0300 Subject: [PATCH] Change piwik service methods in order to get the piwik from portal configuration --- .../affiliations/affiliations.component.html | 2 - .../affiliations/affiliations.component.ts | 111 +++++------------- src/app/affiliations/affiliations.module.ts | 8 +- src/app/app.component.ts | 4 +- src/app/communities/communities.component.ts | 2 +- src/app/community/community.component.ts | 11 +- src/app/contact/contact.component.ts | 2 +- src/app/curators/curators.component.ts | 2 +- .../deposit/zenodo/shareInZenodo.component.ts | 2 +- src/app/get-started/get-started.component.ts | 2 +- .../featured/featuredPage.component.ts | 2 +- src/app/htmlPages/htmlPage.component.ts | 7 +- .../organizationsPage.component.ts | 2 +- src/app/learn-how/faqs/faqs.component.ts | 2 +- src/app/learn-how/learn-how.component.ts | 2 +- .../my-communities.component.ts | 2 +- src/app/openaireLibrary | 2 +- src/app/statistics/statistics.component.ts | 4 +- src/app/subjects/subjects.component.ts | 2 +- src/app/utils/piwikHelper.ts | 4 + 20 files changed, 61 insertions(+), 114 deletions(-) diff --git a/src/app/affiliations/affiliations.component.html b/src/app/affiliations/affiliations.component.html index 08ec20e..6b3c9b5 100644 --- a/src/app/affiliations/affiliations.component.html +++ b/src/app/affiliations/affiliations.component.html @@ -1,5 +1,3 @@ - -

Supporting Organizations

- +
` diff --git a/src/app/learn-how/faqs/faqs.component.ts b/src/app/learn-how/faqs/faqs.component.ts index 35e3552..142015f 100644 --- a/src/app/learn-how/faqs/faqs.component.ts +++ b/src/app/learn-how/faqs/faqs.component.ts @@ -222,7 +222,7 @@ export class FaqsComponent { this.properties = properties; 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.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); diff --git a/src/app/learn-how/learn-how.component.ts b/src/app/learn-how/learn-how.component.ts index 8a2032c..7def084 100644 --- a/src/app/learn-how/learn-how.component.ts +++ b/src/app/learn-how/learn-how.component.ts @@ -249,7 +249,7 @@ export class LearnHowComponent implements OnInit { 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.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); diff --git a/src/app/my-communities/my-communities.component.ts b/src/app/my-communities/my-communities.component.ts index 80fea74..b995c80 100644 --- a/src/app/my-communities/my-communities.component.ts +++ b/src/app/my-communities/my-communities.component.ts @@ -73,7 +73,7 @@ export class MyCommunitiesComponent { 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; diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index c547dfa..49e2edf 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit c547dfa9453b9a68befb41f447d8c410eb7aea2c +Subproject commit 49e2edfe84d441bf1b5bf4bbfb7f94f98d88cb7a diff --git a/src/app/statistics/statistics.component.ts b/src/app/statistics/statistics.component.ts index edcc6fe..b070a6f 100644 --- a/src/app/statistics/statistics.component.ts +++ b/src/app/statistics/statistics.component.ts @@ -91,7 +91,7 @@ export class StatisticsComponent { if(community) { this.communityId = community.communityId; if (this.currentMode == "showInMonitor" && this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId, PiwikHelper.siteIDs[this.communityId]).subscribe()); + this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId).subscribe()); } this.communityName = community.shortTitle; this.createChartUrlMap(); @@ -157,7 +157,7 @@ export class StatisticsComponent { getCommunityInfo() { // console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`); - this.subs.push(this._configService.communityInformationState.subscribe( + this.subs.push(this._configService.portalAsObservable.subscribe( res => { this.communityInfo = res; /*for(let i=0; i