mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Reimplemented GA code. [skip ci]
This commit is contained in:
parent
14934367d8
commit
765152d04b
@ -105,8 +105,10 @@
|
|||||||
|
|
||||||
<!-- actual content -->
|
<!-- actual content -->
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</section><!-- /.content -->
|
</section>
|
||||||
</div><!-- /.content-wrapper -->
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs">
|
||||||
@ -117,7 +119,8 @@
|
|||||||
|
|
||||||
{% include('partials/control-bar.twig') %}
|
{% include('partials/control-bar.twig') %}
|
||||||
|
|
||||||
</div><!-- ./wrapper -->
|
</div>
|
||||||
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
@ -159,6 +162,28 @@
|
|||||||
<script type="text/javascript" src="js/firefly.js"></script>
|
<script type="text/javascript" src="js/firefly.js"></script>
|
||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
(function (i, s, o, g, r, a, m) {
|
||||||
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
i[r] = i[r] || function () {
|
||||||
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
|
}, i[r].l = 1 * new Date();
|
||||||
|
a = s.createElement(o),
|
||||||
|
m = s.getElementsByTagName(o)[0];
|
||||||
|
a.async = 1;
|
||||||
|
a.src = g;
|
||||||
|
m.parentNode.insertBefore(a, m)
|
||||||
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
|
ga('create', '{{ env('ANALYTICS_ID', 'XXX-XX-X') }}', {'siteSpeedSampleRate': 100});
|
||||||
|
ga('send', 'pageview');
|
||||||
|
// send an event if relevant:
|
||||||
|
{% 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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -59,16 +59,15 @@
|
|||||||
a.src = g;
|
a.src = g;
|
||||||
m.parentNode.insertBefore(a, m)
|
m.parentNode.insertBefore(a, m)
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
|
ga('create', '{{ env('ANALYTICS_ID', 'XXX-XX-X') }}', {'siteSpeedSampleRate': 100});
|
||||||
ga('create', '{{ env('ANALYTICS_ID', 'XXX-XX-X') }}', 'auto');
|
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
// send an event if relevant:
|
// 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')}}');
|
ga('send', 'event', '{{Session.get('gaEventCategory')}}', '{{Session.get('gaEventAction')}}');
|
||||||
{% endif %}
|
{% 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>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user