diff --git a/src/app/shared/log-in/log-in.component.html b/src/app/shared/log-in/log-in.component.html
index 6e4685a07b..36f7034f4d 100644
--- a/src/app/shared/log-in/log-in.component.html
+++ b/src/app/shared/log-in/log-in.component.html
@@ -1,6 +1,6 @@
-
+
{{"login.form.or-divider" | translate}}
diff --git a/src/app/shared/log-in/log-in.component.ts b/src/app/shared/log-in/log-in.component.ts
index 120f3ac4fa..e6b2ba9dcf 100644
--- a/src/app/shared/log-in/log-in.component.ts
+++ b/src/app/shared/log-in/log-in.component.ts
@@ -14,6 +14,7 @@ import { AuthService } from '../../core/auth/auth.service';
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
import { CoreState } from '../../core/core-state.model';
+import { AuthMethodType } from '../../core/auth/models/auth.method-type';
/**
* /users/sign-in
@@ -36,7 +37,7 @@ export class LogInComponent implements OnInit {
* The list of authentication methods available
* @type {AuthMethod[]}
*/
- public authMethods: Observable;
+ public authMethods: AuthMethod[];
/**
* Whether user is authenticated.
@@ -62,9 +63,12 @@ export class LogInComponent implements OnInit {
ngOnInit(): void {
- this.authMethods = this.store.pipe(
+ this.store.pipe(
select(getAuthenticationMethods),
- );
+ ).subscribe(methods => {
+ // ignore the ip authentication method when it's returned by the backend
+ this.authMethods = methods.filter(a => a.authMethodType !== AuthMethodType.Ip);
+ });
// set loading
this.loading = this.store.pipe(select(isAuthenticationLoading));
diff --git a/src/app/statistics/angulartics/dspace-provider.spec.ts b/src/app/statistics/angulartics/dspace-provider.spec.ts
index 8491d8e80c..73c2419ce6 100644
--- a/src/app/statistics/angulartics/dspace-provider.spec.ts
+++ b/src/app/statistics/angulartics/dspace-provider.spec.ts
@@ -11,7 +11,7 @@ describe('Angulartics2DSpace', () => {
beforeEach(() => {
angulartics2 = {
- eventTrack: observableOf({action: 'pageView', properties: {object: 'mock-object'}}),
+ eventTrack: observableOf({action: 'page_view', properties: {object: 'mock-object'}}),
filterDeveloperMode: () => filter(() => true)
} as any;
statisticsService = jasmine.createSpyObj('statisticsService', {trackViewEvent: null});
diff --git a/src/app/statistics/angulartics/dspace-provider.ts b/src/app/statistics/angulartics/dspace-provider.ts
index cd1aab94bd..6efa67f92a 100644
--- a/src/app/statistics/angulartics/dspace-provider.ts
+++ b/src/app/statistics/angulartics/dspace-provider.ts
@@ -24,7 +24,7 @@ export class Angulartics2DSpace {
}
private eventTrack(event) {
- if (event.action === 'pageView') {
+ if (event.action === 'page_view') {
this.statisticsService.trackViewEvent(event.properties.object);
} else if (event.action === 'search') {
this.statisticsService.trackSearchEvent(
diff --git a/src/app/statistics/angulartics/dspace/view-tracker.component.ts b/src/app/statistics/angulartics/dspace/view-tracker.component.ts
index 85588aeb97..d12b6c2f69 100644
--- a/src/app/statistics/angulartics/dspace/view-tracker.component.ts
+++ b/src/app/statistics/angulartics/dspace/view-tracker.component.ts
@@ -20,7 +20,7 @@ export class ViewTrackerComponent implements OnInit {
ngOnInit(): void {
this.angulartics2.eventTrack.next({
- action: 'pageView',
+ action: 'page_view',
properties: {object: this.object},
});
}
diff --git a/src/app/statistics/google-analytics.service.spec.ts b/src/app/statistics/google-analytics.service.spec.ts
index 9e2b1c7edf..2465e4db0e 100644
--- a/src/app/statistics/google-analytics.service.spec.ts
+++ b/src/app/statistics/google-analytics.service.spec.ts
@@ -1,4 +1,7 @@
-import { Angulartics2GoogleAnalytics, Angulartics2GoogleTagManager } from 'angulartics2';
+import {
+ Angulartics2GoogleAnalytics,
+ Angulartics2GoogleGlobalSiteTag,
+} from 'angulartics2';
import { of } from 'rxjs';
import { GoogleAnalyticsService } from './google-analytics.service';
@@ -16,7 +19,7 @@ describe('GoogleAnalyticsService', () => {
const srcTestValue = 'mock-script-src';
let service: GoogleAnalyticsService;
let googleAnalyticsSpy: Angulartics2GoogleAnalytics;
- let googleTagManagerSpy: Angulartics2GoogleTagManager;
+ let googleTagManagerSpy: Angulartics2GoogleGlobalSiteTag;
let configSpy: ConfigurationDataService;
let klaroServiceSpy: jasmine.SpyObj;
let scriptElementMock: any;
@@ -37,7 +40,7 @@ describe('GoogleAnalyticsService', () => {
googleAnalyticsSpy = jasmine.createSpyObj('Angulartics2GoogleAnalytics', [
'startTracking',
]);
- googleTagManagerSpy = jasmine.createSpyObj('Angulartics2GoogleTagManager', [
+ googleTagManagerSpy = jasmine.createSpyObj('Angulartics2GoogleGlobalSiteTag', [
'startTracking',
]);
diff --git a/src/app/statistics/google-analytics.service.ts b/src/app/statistics/google-analytics.service.ts
index 9c5883d183..9d32a61093 100644
--- a/src/app/statistics/google-analytics.service.ts
+++ b/src/app/statistics/google-analytics.service.ts
@@ -1,7 +1,10 @@
import { DOCUMENT } from '@angular/common';
import { Inject, Injectable } from '@angular/core';
-import { Angulartics2GoogleAnalytics, Angulartics2GoogleTagManager } from 'angulartics2';
+import {
+ Angulartics2GoogleAnalytics,
+ Angulartics2GoogleGlobalSiteTag,
+} from 'angulartics2';
import { combineLatest } from 'rxjs';
import { ConfigurationDataService } from '../core/data/configuration-data.service';
@@ -19,7 +22,7 @@ export class GoogleAnalyticsService {
constructor(
private googleAnalytics: Angulartics2GoogleAnalytics,
- private googleTagManager: Angulartics2GoogleTagManager,
+ private googleGlobalSiteTag: Angulartics2GoogleGlobalSiteTag,
private klaroService: KlaroService,
private configService: ConfigurationDataService,
@Inject(DOCUMENT) private document: any,
@@ -70,7 +73,7 @@ export class GoogleAnalyticsService {
this.document.body.appendChild(libScript);
// start tracking
- this.googleTagManager.startTracking();
+ this.googleGlobalSiteTag.startTracking();
} else {
// add trackingId snippet to page
const keyScript = this.document.createElement('script');
diff --git a/src/modules/app/server-app.module.ts b/src/modules/app/server-app.module.ts
index 17e394ede8..81426e7fcc 100644
--- a/src/modules/app/server-app.module.ts
+++ b/src/modules/app/server-app.module.ts
@@ -6,7 +6,11 @@ import { ServerModule, ServerTransferStateModule } from '@angular/platform-serve
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
-import { Angulartics2, Angulartics2GoogleAnalytics, Angulartics2GoogleTagManager } from 'angulartics2';
+import {
+ Angulartics2,
+ Angulartics2GoogleAnalytics,
+ Angulartics2GoogleGlobalSiteTag
+} from 'angulartics2';
import { AppComponent } from '../../app/app.component';
@@ -63,7 +67,7 @@ export function createTranslateLoader(transferState: TransferState) {
useClass: AngularticsProviderMock
},
{
- provide: Angulartics2GoogleTagManager,
+ provide: Angulartics2GoogleGlobalSiteTag,
useClass: AngularticsProviderMock
},
{