diff --git a/modules/material/themes/material/default/selectidp-links.twig b/modules/material/themes/material/default/selectidp-links.twig
index 0c5cd545..83af8f97 100644
--- a/modules/material/themes/material/default/selectidp-links.twig
+++ b/modules/material/themes/material/default/selectidp-links.twig
@@ -14,6 +14,7 @@
idpInput.value = id;
document.querySelector('form').appendChild(idpInput);
+
{% if analytics_tracking_id is not empty %}
gtag('event', 'IdP', {
'event_category': 'hub',
@@ -21,6 +22,7 @@
'value': id
});
{% endif %}
+
document.querySelector('form').submit();
}
@@ -33,7 +35,9 @@
});
function clickedAnyway(idpName) {
- ga('send', 'event', 'hub', 'choice-disabled', 'IdP', idpName);
+ {% if analytics_tracking_id is not empty %}
+ ga('send', 'event', 'hub', 'choice-disabled', 'IdP', idpName);
+ {% endif %}
}
diff --git a/modules/material/themes/material/mfa/new-backup-codes.twig b/modules/material/themes/material/mfa/new-backup-codes.twig
index 015b6371..12dd59da 100644
--- a/modules/material/themes/material/mfa/new-backup-codes.twig
+++ b/modules/material/themes/material/mfa/new-backup-codes.twig
@@ -136,9 +136,11 @@
-
+ {% if analytics_tracking_id is not empty %}
+
+ {% endif %}
{% endif %}
diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-backupcode.twig b/modules/material/themes/material/mfa/prompt-for-mfa-backupcode.twig
index 3f6603bc..a275153b 100644
--- a/modules/material/themes/material/mfa/prompt-for-mfa-backupcode.twig
+++ b/modules/material/themes/material/mfa/prompt-for-mfa-backupcode.twig
@@ -53,9 +53,11 @@
-
+ {% if analytics_tracking_id is not empty %}
+
+ {% endif %}
{% endif %}
diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig b/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig
index 0a6197b3..d7ab56ab 100644
--- a/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig
+++ b/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig
@@ -53,9 +53,11 @@
-
+ {% if analytics_tracking_id is not empty %}
+
+ {% endif %}
{% endif %}
diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig b/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig
index b6701a5d..d8dd51cd 100644
--- a/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig
+++ b/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig
@@ -51,9 +51,11 @@
-
+ {% if analytics_tracking_id is not empty %}
+
+ {% endif %}
{% endif %}
diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig b/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig
index e15c1b4f..61370b24 100644
--- a/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig
+++ b/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig
@@ -94,7 +94,7 @@
- {% if error_message is not empty %}
+ {% if error_message is not empty and analytics_tracking_id is not empty %}
diff --git a/modules/material/themes/material/silauth/loginuserpass.twig b/modules/material/themes/material/silauth/loginuserpass.twig
index f56333d9..bfafb719 100644
--- a/modules/material/themes/material/silauth/loginuserpass.twig
+++ b/modules/material/themes/material/silauth/loginuserpass.twig
@@ -28,7 +28,9 @@
});
}
- ga('send', 'event', 'reCAPTCHA', 'required');
+ {% if analytics_tracking_id is not empty %}
+ ga('send', 'event', 'reCAPTCHA', 'required');
+ {% endif %}
{% endif %}
@@ -100,9 +102,11 @@
-
+ {% if analytics_tracking_id is not empty %}
+
+ {% endif %}
{% endif %}