Google Analytics

Basti

Administrator
Staff member
Thanks for the share :)
Small thing to point out.

1. Zip should not contain the plugin folder, just the language folder and the files. Else the plugin uploader just uploads folder without files
2. category_welcome.html can be deleted
 

cajkan

Active Member
Hey Does the google analitycs code looks like this

UA-33165690-1
/ or this is user ID only

or should look like this


<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-33165690-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>
and where can we look at analitycs
 

Basti

Administrator
Staff member
The second one it what you are after. You will need to create a google account to use analytics if iam not wrong. From there you also get your code which you can insert into admin.
 

BernieW

New Member
Hi All,

I created a google account, posted the following in the admin section but i do not get any hits reported within the google analytics area for my account. Any ideas?

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-38011571-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>

Thx
 

Basti

Administrator
Staff member
Can you check your page source please if it renders as it should? ( no stripped chars etc )

Also, i think google need quite some time to update reports, a day if iam not wrong ( not using it myself )

EDIT: It seems this was never documented, you need to add a template tag to wrapper
{$ga}

However it might just be easier to edit a plugin file, since we have a predefined tmpl tag already for extra javascript codes, but author havent made use of it. That way you dont need to update your layout.
Ill add in this change later today to the plugin
in the plugin folder, open global_start.php
The following line
Code:
$TMPL['ga'] = $CONF['site_ga'];
Replace with
Code:
$TMPL['extra_javascripts'] .= $CONF['site_ga'];
 

cajkan

Active Member
Also make sure your website is submited to google webmasters,
Check if your domain is non-www or www at google analytics
 

Basti

Administrator
Staff member
Pretty sure it was the issue i mentioned. Bernie, please download and then upload the zip again
Let me know if it works now
 

BernieW

New Member
Hi All,

Seems I was impatient. Check the stats today and it is capturing data. I have not uploaded the updated plugin. I will do that later today and check it still works. Thanks everyone for your help. Seems you need to wait at least 12-24hrs for the logging to start at Google.

Cheers
 

Basti

Administrator
Staff member
A small update to go with the latest patch for 1.0. Nothing major, but will correct a few design issues who came up after the patch. A simple overwrite ( upload via admin plugin manager is enough )
 

cajkan

Active Member
Hello Ronsoriano,
Once you installed plugin, you can enter your GA code here:
Settings -> Change Settings -> General Settings -> Google Analytics code

Scroll down and click Change Settings.
 
Top