read piwikId from API (portal) instead of PiwikHelper.ts, update submodules
This commit is contained in:
parent
d2ad0ba20e
commit
9511e28157
|
@ -3,7 +3,6 @@ import {ActivatedRoute, Router} from '@angular/router';
|
|||
import {DOCUMENT, Location} from '@angular/common';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
|
@ -12,8 +11,6 @@ import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommuni
|
|||
import {Session, User} from '../openaireLibrary/login/utils/helper.class';
|
||||
import {StatisticsForDashboardComponent} from '../statistics/statistics.component';
|
||||
import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
|
||||
|
||||
import {PiwikHelper} from '../utils/piwikHelper';
|
||||
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
|
||||
import {SearchCommunityProjectsService} from "../openaireLibrary/connect/projects/searchProjects.service";
|
||||
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
|
||||
|
@ -140,6 +137,7 @@ export class CommunityComponent {
|
|||
};
|
||||
disableSelect: boolean = true;
|
||||
openaireEntities= OpenaireEntities;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(
|
||||
private element: ElementRef,
|
||||
|
@ -206,7 +204,12 @@ export class CommunityComponent {
|
|||
this._meta.updateTag({content: community.title}, "property='og:title'");
|
||||
this._title.setTitle(community.title);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, community.title, PiwikHelper.getSiteId(this.communityId)).subscribe());
|
||||
this.subs.push(this.config.communityInformationState.subscribe(portal => {
|
||||
if(portal && portal.piwik) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
this.subs.push(this._piwikService.trackView(this.properties, community.title, this.piwikSiteId).subscribe());
|
||||
}
|
||||
}));
|
||||
}
|
||||
if (this.community.zenodoCommunity) {
|
||||
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe(
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c862be75613fa1cf08a3bf276b9f4e1b56a3321c
|
||||
Subproject commit cb57b78351af8ce08e178ff1bc69d73c43044cc2
|
|
@ -1 +1 @@
|
|||
Subproject commit 050fcbce9343f849956800b4634f62fefee7e210
|
||||
Subproject commit 99fab0671bee8251230599ef9bc3034aff39c141
|
|
@ -1 +1 @@
|
|||
Subproject commit 35ab282e53ad5b7790bc431820a4400cfc36c977
|
||||
Subproject commit e3e2a6ec11055f4d4352d0749bb1b484ddd711ae
|
Loading…
Reference in New Issue