Hi!
I just pasted my Google Analytics tracking code into System > Settings > [my store] > Server > 'Google Analytics Code:' box and the tracking code is showing up on my store's home page. i.e; visible to users.
In fact it's on every page at the very top left of the screen. I'm using the default unmodified template on a totally fresh install.
Bug? Or me? ;-)
Thanks,
Steve
I just pasted my Google Analytics tracking code into System > Settings > [my store] > Server > 'Google Analytics Code:' box and the tracking code is showing up on my store's home page. i.e; visible to users.
In fact it's on every page at the very top left of the screen. I'm using the default unmodified template on a totally fresh install.
Bug? Or me? ;-)
Thanks,
Steve
steveharman wrote:Hi!
I just pasted my Google Analytics tracking code into System > Settings > [my store] > Server > 'Google Analytics Code:' box and the tracking code is showing up on my store's home page. i.e; visible to users.
In fact it's on every page at the very top left of the screen. I'm using the default unmodified template on a totally fresh install.
Bug? Or me? ;-)
Thanks,
Steve
you!
OpenCart®
Project Owner & Developer.
You are both correct! ;-) And thanks it's working fine now.
In fairness though; bit ambiguous in the admin page, code or code?
System > Settings > Server > Google Analytics Code box says, and I quote, "Login to your Google Analytics account and after creating your web site profile copy and paste the analytics code into this field." Fine so my analytics code is UA-xxxyyz44-1 and away I go. Perhaps like many others I suspect, I'd assumed OpenCart had the JavaScript in place which it wrapped around my UA-xxxyyzz "analytics code" that I put in the appropriate box.
No big deal, just a slight usability clarification for future users perhaps?
Thanks again folks.
Steve
In fairness though; bit ambiguous in the admin page, code or code?
System > Settings > Server > Google Analytics Code box says, and I quote, "Login to your Google Analytics account and after creating your web site profile copy and paste the analytics code into this field." Fine so my analytics code is UA-xxxyyz44-1 and away I go. Perhaps like many others I suspect, I'd assumed OpenCart had the JavaScript in place which it wrapped around my UA-xxxyyzz "analytics code" that I put in the appropriate box.
No big deal, just a slight usability clarification for future users perhaps?
Thanks again folks.
Steve
Hi I'am sorry but i couldn't manage it. How did you solve this problem. What do you guys mean with script surrounding the code? please help. Can't get this work out.steveharman wrote:You are both correct! ;-) And thanks it's working fine now.
In fairness though; bit ambiguous in the admin page, code or code?
System > Settings > Server > Google Analytics Code box says, and I quote, "Login to your Google Analytics account and after creating your web site profile copy and paste the analytics code into this field." Fine so my analytics code is UA-xxxyyz44-1 and away I go. Perhaps like many others I suspect, I'd assumed OpenCart had the JavaScript in place which it wrapped around my UA-xxxyyzz "analytics code" that I put in the appropriate box.
No big deal, just a slight usability clarification for future users perhaps?
Thanks again folks.
Steve
Hi!
At the section of Google's Analytics site ('Admin') which displays your unique tracking code (usually begins with UA....), there should also be a chunk of HTML / JavaScript code shown at the bottom of the page. It'll be something like this:
Notice your own tracking code will be shown where my example has UA-xxxxxxxx. Copy and paste that entire block of code from Google's site and put that into OpenCart at System > Settings > [your site] > Server > 'Google Analytics Code:' (scroll to bottom of page).
That's where I fell down, OpenCart asks for 'Google Analytics Code' and I gave it... my Google Analytics code! What OpenCart actually needed was the Analytics code and all the supporting JavaScript etc.
Seems to work fine now.
HTH
Steve
At the section of Google's Analytics site ('Admin') which displays your unique tracking code (usually begins with UA....), there should also be a chunk of HTML / JavaScript code shown at the bottom of the page. It'll be something like this:
Code: Select all
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxxx-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
That's where I fell down, OpenCart asks for 'Google Analytics Code' and I gave it... my Google Analytics code! What OpenCart actually needed was the Analytics code and all the supporting JavaScript etc.
Seems to work fine now.
HTH
Steve
Has anyone figured out how to get Google analytics code set up for multiple stores? I have two stores configured and two unique codes from google, but I have no idea how to set this up to work and can't find a post any where about it.
Lou
Lou
OK,
I put the code below and google keeps reporting:
Tracking ID
UA-36229666-1
Status: Tracking Not Installed.
Any idea how to fix this?
Code is in the box in SYSTEM, SETTINGS, Hobby-drones store, SERVER tab:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36229666-1']);
_gaq.push(['_setDomainName', 'hobby-drones.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
I put the code below and google keeps reporting:
Tracking ID
UA-36229666-1
Status: Tracking Not Installed.
Any idea how to fix this?
Code is in the box in SYSTEM, SETTINGS, Hobby-drones store, SERVER tab:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36229666-1']);
_gaq.push(['_setDomainName', 'hobby-drones.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Lou...
I am using this FREE extension for the Multistore Google Anayltics:
http://www.opencart.com/index.php?route ... on_id=6571
Gail
I am using this FREE extension for the Multistore Google Anayltics:
http://www.opencart.com/index.php?route ... on_id=6571
Gail
Ok, go via ftp to the catalog-view-theme-your_theme-template-common folder. Find header.tpl file. Backup it. Open it and find <body>. Below this paste a code from google analytic like:lperagallo wrote:OK,
I put the code below and google keeps reporting:
Tracking ID
UA-36229666-1
Status: Tracking Not Installed.
Any idea how to fix this?
Code is in the box in SYSTEM, SETTINGS, Hobby-drones store, SERVER tab:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36229666-1']);
_gaq.push(['_setDomainName', 'hobby-drones.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Code: Select all
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxx-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Good Posting. I too slammed in my code thinking "code" meant the number UA - xxxxxxxx-x only to read this post and realize that code meant the full tracking code. Thanks much. Our store has not gone live yet so I can't test much but it appears to be working.
Just an fyi - you can put any code you need to add to the header in this box, not just google analytics. I'm using the multistore mod now and can add my alexa, yahoo shopping, and other verification code lines (the complete < code > ) into the box along with the Google Analytics one easily for any store at any time. Very helpful.
Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
You shouldn't use the analytics code box for anything besides Google analytics. Other mods use it like an object sometimes. For example ecommerce tracking takes it out of header and puts before foot on order complete page. If you had other mods in the box that depended on closing head location, they might wonk out.labeshops wrote:Just an fyi - you can put any code you need to add to the header in this box, not just google analytics. I'm using the multistore mod now and can add my alexa, yahoo shopping, and other verification code lines (the complete < code > ) into the box along with the Google Analytics one easily for any store at any time. Very helpful.
I realize this is a way old thread, but its coming up for searches. We made a free mod to help with this stuff regarding more code boxes and multi-store compatibility. Should help solve some of this and extend code boxes for things like live chat, otmizely, tag manager, etc: http://www.opencart.com/index.php?route ... n_id=19485
https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.
Who is online
Users browsing this forum: No registered users and 36 guests