+1
Completed

Google Analytics

Christian O 4 years ago updated by Vlad R 3 years ago 4

Please add ability to add Google Analytics tracking code (note we can't add it ourselves as adding the code to custimizables/include.html results in a PHP error).

Answer

Answer
Completed

A control panel option for including analytics tracking HTML code inside FileRun will be added with the upcoming software update.

Completed

The code inside "custimizables/include.html" is parsed as Smarty template syntax, so you need to escape all { and } characters.

You do that like this:


{literal}

...your HTML/JS code...

{/literal}

I've tried adding;

{literal}
<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','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-XXXXXX-XX','auto');
ga('send','pageview');
</script>
{/literal}


However, I don't see this added when I do 'View Source' or by viewing the generated HTML code in Web Developer Tools. Any ideas?

You might not be editing the right file, or looking for the result in the right place, or perhaps you are looking at a cached version of the page' source.

Answer
Completed

A control panel option for including analytics tracking HTML code inside FileRun will be added with the upcoming software update.