New GA events [skip ci]

This commit is contained in:
James Cole
2015-05-25 08:12:31 +02:00
parent 8ece341467
commit 60fe8ce011
9 changed files with 55 additions and 1 deletions

View File

@@ -169,9 +169,12 @@
ga('send', 'pageview');
// send an event if relevant:
{% if Session.has('gaEventCategory') and Session.has('gaEventAction') %}
{% if Session.has('gaEventCategory') and Session.has('gaEventAction') and not Session.has('gaEventLabel') %}
ga('send', 'event', '{{Session.get('gaEventCategory')}}', '{{Session.get('gaEventAction')}}');
{% endif %}
{% if Session.has('gaEventCategory') and Session.has('gaEventAction') and Session.has('gaEventLabel') %}
ga('send', 'event', '{{Session.get('gaEventCategory')}}', '{{Session.get('gaEventAction')}}','{{ Session.get('gaEventLabel') }}');
{% endif %}
</script>
</body>