keat63

Well-Known Member
Nov 20, 2014
1,339
99
28
cPanel Access Level
Root Administrator
I use an OS Commerce web site which has an area inside it's own admin panel to add my analytics code, so no programming skills required.
However, If I look at the final page source, I can see the actual php script.
I'm not sure if this will work, but its worth a try for nothing.

Paste the follwing code in to your PHP file, add your Google ID where it says 'Your Google ID'

Code:
<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', 'Your Google ID', 'auto'); // Replace with your property ID.
ga('send', 'pageview');
</script>
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,090
559
263
Houston
cPanel Access Level
DataCenter Provider