Skip to content

Commit

Permalink
wrap gtag call
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Nov 27, 2024
1 parent 81b1ecd commit 31ea007
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/material/themes/material/default/selectidp-links.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
idpInput.value = id;
document.querySelector('form').appendChild(idpInput);
gtag('event', 'IdP', {
'event_category': 'hub',
'event_label': 'choice',
'value': id
});
{% if analytics_tracking_id is not empty %}
gtag('event', 'IdP', {
'event_category': 'hub',
'event_label': 'choice',
'value': id
});
{% endif %}
document.querySelector('form').submit();
}
Expand Down

0 comments on commit 31ea007

Please sign in to comment.