sproctor / php-calendar

PHP-Calendar
http://www.php-calendar.org/
Apache License 2.0
138 stars 67 forks source link

Allow custom code to be added #130

Closed swalker48329 closed 2 years ago

swalker48329 commented 9 years ago

In what file and where can I add my Google analytic code for the calendar?

sabas commented 9 years ago

Here https://github.com/sproctor/php-calendar/blob/master/index.php#L129 you can add a new tag with the value you need. Could be

tag('script',attrs()," (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', 'UA-XXXXXXXX', 'example.com'); ga('send', 'pageview');");