Change piwik base on the new dynamic piwik.

This commit is contained in:
Konstantinos Triantafyllou 2023-07-13 10:55:08 +03:00
parent b93da0d434
commit e724914d64
8 changed files with 11 additions and 27 deletions

View File

@ -88,7 +88,7 @@ export class AppComponent {
if (typeof document !== 'undefined') { if (typeof document !== 'undefined') {
this.isClient = true; this.isClient = true;
} }
this.configurationService.initCommunityInformation(this.properties, this.properties.adminToolsCommunity); this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
this.feedbackmail = this.properties.feedbackmail; this.feedbackmail = this.properties.feedbackmail;
if (this.properties.environment == "production" || this.properties.environment == "development") { if (this.properties.environment == "production" || this.properties.environment == "development") {
this.subscriptions.push(this.route.queryParams.subscribe(data => { this.subscriptions.push(this.route.queryParams.subscribe(data => {

View File

@ -60,10 +60,7 @@ export class ContactComponent implements OnInit {
this.properties = properties; this.properties = properties;
this.email = {body: '', subject: '', recipients: []}; this.email = {body: '', subject: '', recipients: []};
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.url = this.properties.domain + this._router.url; this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);

View File

@ -4,12 +4,8 @@ import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'explore-fos', selector: 'explore-fos',
template: ` template: `
<fos [piwikSiteId]="piwikSiteId"></fos> <fos></fos>
` `
}) })
export class ExploreFosComponent { export class ExploreFosComponent {}
piwikSiteId = properties.piwikSiteId;
constructor() {}
}

View File

@ -63,9 +63,7 @@ export class FundersComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.title.setTitle('OpenAIRE - Explore | Funders'); this.title.setTitle('OpenAIRE - Explore | Funders');
this.properties = properties; this.properties = properties;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subscriptions.push( this.piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.subscriptions.push( this.piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.url = this.properties.domain + this.router.url; this.url = this.properties.domain + this.router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);

View File

@ -213,9 +213,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
if (this.properties != null) { if (this.properties != null) {
var url = this.properties.domain + this.properties.baseLink + this._router.url; var url = this.properties.domain + this.properties.baseLink + this._router.url;
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE").subscribe()); this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE").subscribe());
}
if(this.numbersComponent) { if(this.numbersComponent) {
this.numbersComponent.showPublications = false; this.numbersComponent.showPublications = false;
this.numbersComponent.showDatasets = false; this.numbersComponent.showDatasets = false;
@ -225,7 +223,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
this.numbersComponent.showDataProviders = false; this.numbersComponent.showDataProviders = false;
this.numbersComponent.showOrganizations = false; this.numbersComponent.showOrganizations = false;
} }
this.subscriptions.push(this.config.communityInformationState.subscribe(data => { this.subscriptions.push(this.config.portalAsObservable.subscribe(data => {
if(data) { if(data) {
var showEntity = {}; var showEntity = {};
for (var i = 0; i < data['entities'].length; i++) { for (var i = 0; i < data['entities'].length; i++) {

@ -1 +1 @@
Subproject commit 870ce718972596f5c36ae79271927c7f4279ff58 Subproject commit 78f87e61bb57adbc7c7cc58c57a97948309a3853

View File

@ -4,12 +4,7 @@ import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'explore-sdg', selector: 'explore-sdg',
template: ` template: `
<sdg [piwikSiteId]="piwikSiteId"></sdg> <sdg></sdg>
` `
}) })
export class ExploreSdgComponent { export class ExploreSdgComponent {}
piwikSiteId = properties.piwikSiteId;
constructor() {
}
}

@ -1 +1 @@
Subproject commit fda17bc450a93400ebd070ff358b2b19a936ecae Subproject commit 2fd57843f85125e54adfb95b35776755037ea359