Skip to content

Commit

Permalink
fix other instances of ga being used instead of gtag
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Nov 27, 2024
1 parent 5bb3bf0 commit cb9cab6
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
function clickedAnyway(idpName) {
{% if analytics_tracking_id is not empty %}
ga('send', 'event', 'hub', 'choice-disabled', 'IdP', idpName);
gtag('event', 'IdP', {
'event_category': 'hub',
'event_label': 'choice',
'value': id
});
{% endif %}
}
</script>
Expand Down
5 changes: 4 additions & 1 deletion modules/material/themes/material/mfa/new-backup-codes.twig
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@

{% if analytics_tracking_id is not empty %}
<script>
ga('send', 'event', 'error', 'backupcode', 'generation-failed');
gtag('event', 'generation-failed', {
'event_category': 'error',
'event_label': 'backupcode'
});
</script>
{% endif %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@

{% if analytics_tracking_id is not empty %}
<script>
ga('send', 'event', 'error', 'backupcode', '{{ error_message|e('js')|raw }}');
gtag('event', '{{ error_message|e('js')|raw }}', {
'event_category': 'error',
'event_label': 'backupcode'
});
</script>
{% endif %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@

{% if analytics_tracking_id is not empty %}
<script>
ga('send', 'event', 'error', 'managercode', '{{ error_message|e('js')|raw }}');
gtag('event', '{{ error_message|e('js')|raw }}', {
'event_category': 'error',
'event_label': 'managercode'
});
</script>
{% endif %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@

{% if analytics_tracking_id is not empty %}
<script>
ga('send', 'event', 'error', 'totp', '{{ error_message|e('js')|raw }}');
gtag('event', '{{ error_message|e('js')|raw }}', {
'event_category': 'error',
'event_label': 'totp'
});
</script>
{% endif %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@

{% if error_message is not empty and analytics_tracking_id is not empty %}
<script>
ga('send', 'event', 'error', 'webauthn', '{{ error_message|e('js')|raw }}');
gtag('event', '{{ error_message|e('js')|raw }}', {
'event_category': 'error',
'event_label': 'webauthn'
});
</script>
{% endif %}
<div class="mdl-card__supporting-text" layout-children="column">
Expand Down
10 changes: 8 additions & 2 deletions modules/material/themes/material/silauth/loginuserpass.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
}
{% if analytics_tracking_id is not empty %}
ga('send', 'event', 'reCAPTCHA', 'required');
gtag('event', 'required', {
'event_category': 'reCAPTCHA'
});
{% endif %}
</script>
{% endif %}
Expand Down Expand Up @@ -104,7 +106,11 @@

{% if analytics_tracking_id is not empty %}
<script>
ga('send', 'event', 'error', '{{ errorcode|e('js') }}', 'message', '{{ message|e('js') }}');
gtag('event', '{{ errorcode|e('js') }}', {
'event_category': 'error',
'event_label': 'message',
'value': '{{ message|e('js') }}'
});
</script>
{% endif %}
{% endif %}
Expand Down

0 comments on commit cb9cab6

Please sign in to comment.