Skip to content

Commit cd93ccc

Browse files
committed
Change google analytics script on default theme
1 parent 54cc745 commit cd93ccc

File tree

1 file changed

+10
-11
lines changed
  • PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Default_Theme/Default/layout

1 file changed

+10
-11
lines changed

PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Default_Theme/Default/layout/theme.liquid

+10-11
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,16 @@
9292
<body id="{{ page_title | handle }}" class="{% if customer %}customer-logged-in {% endif %}template-{{ template | replace: '.', ' ' | truncatewords: 1, '' | handle }}" >
9393
{% if settings.google_analytics_tracking_id != null %}
9494
<script type="text/javascript">
95-
var _gaq = _gaq || [];
96-
_gaq.push(['_setAccount', '{{ settings.google_analytics_tracking_id }}']);
97-
_gaq.push(['_setDomainName', 'virtocommerce.com']);
98-
_gaq.push(['_trackPageview']);
99-
100-
(function() {
101-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
102-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
103-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
104-
})();
105-
</script>
95+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
96+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
97+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
98+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
99+
100+
ga('create', '{{ settings.google_analytics_tracking_id }}', 'auto');
101+
ga('send', 'pageview');
102+
103+
</script>
104+
106105
{% endif %}
107106
{% if settings.store_selector_enable %}{% include 'top-header-selector' %}{% endif %}
108107

0 commit comments

Comments
 (0)