Skip to content

Commit 72fe3fd

Browse files
committed
Update googlanalytics var
1 parent 8ff0e1c commit 72fe3fd

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

event/listener.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ static public function getSubscribedEvents()
6060
*/
6161
public function load_google_analytics($event)
6262
{
63-
$this->template->assign_vars(array(
64-
'S_GOOGLE_ANALYTICS_ENABLE' => (!empty($this->config['googleanalytics'])) ? true : false,
65-
'GOOGLE_ANALYTICS_ID' => $this->config['googleanalytics'],
66-
));
63+
$this->template->assign_var('GOOGLEANALYTICS_ID', $this->config['googleanalytics_id']);
6764
}
6865
}

styles/all/template/overall_footer_after.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!-- S_GOOGLE_ANALYTICS_ENABLE -->
1+
<!-- IF GOOGLEANALYTICS_ID -->
22
<script>
33
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
44
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
55
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
66
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
77

8-
ga('create', '{GOOGLE_ANALYTICS_ID}', 'auto');
8+
ga('create', '{GOOGLEANALYTICS_ID}', 'auto');
99
ga('send', 'pageview');
1010

1111
</script>

0 commit comments

Comments
 (0)