| View previous topic :: View next topic |
| Author |
Message |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Wed Apr 30, 2008 14:55 Post subject: [Plugin] Google Analytics code plugin |
|
|
Did your Google Analytics code survive your latest upgrade? Is it still there when you changed your skin? No worries anymore. This plugin will inject the Google Analytics code into every page in your blog, even in the Admin section.
When you subscribe to Google Analytics you get a snippet of code that goes at the bottom of the page. At the moment there is a deprecates snippet and a new one. Of course the plugin uses the new one. This is how the snippet looks:
| PHP: |
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1234567-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
|
You will need to copy/paste the pageTracker code. Formerly known as _uacct, but the code didn't change. It's the code that looks like UA-1234567-1 in this snippet. You add that to the setting of the plugin:
google_analytics_plugin.zip
Have fun _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Last edited by Afwas on Wed Apr 30, 2008 15:56; edited 1 time in total |
|
| Back to top |
|
 |
tilqicom Guru

Joined: 14 Nov 2007 Posts: 1624
       votes: 20
|
Posted: Wed Apr 30, 2008 15:28 Post subject: |
|
|
looks cool, thank you Afwas, another useful plugin _________________
.: linkback ≠ spam, yes to linkback, no to spam  |
|
| Back to top |
|
 |
Walter Hooked :)

 Joined: 11 May 2004 Posts: 416
  votes: 5
|
Posted: Tue May 06, 2008 15:33 Post subject: |
|
|
Cool Afwas!
What I want is different settings of analytics for each blog
DO you have any idea of how to implement that?
[]'s
- Walter _________________ []'s
- Walter
http://b2evolution.waltercruz.com |
|
| Back to top |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Tue May 06, 2008 18:43 Post subject: |
|
|
I'll try, Walter, but I haven't got a clue yet how it should scale to, say, 500 blogs.
I think if you have 500 bloggers you want a widget in a newly to be created container. That'll give them their own options and responsibility. If it's more like ten blog for you as Admin only, then an option in the Plugin Settings will do.
I'll think about it. _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net |
|
| Back to top |
|
 |
Walter Hooked :)

 Joined: 11 May 2004 Posts: 416
  votes: 5
|
|
| Back to top |
|
 |
jinn New Poster

Joined: 13 May 2008 Posts: 6
 
|
Posted: Tue May 13, 2008 2:55 Post subject: |
|
|
I'm using b2evolution 2.4.2 and I installed this plugin.
I have put in the _uacct code in the plugin screen and have waited for more than 24 hours (in fact, it's already been more than 48 hours now). But when I click on "Check Status" button in Google Analytics page, it will always tell me that my tracking code is not installed.
What have I missed? Is there any other settings I need to do in the Plugin screen in b2evolution Admin?
Please help. |
|
| Back to top |
|
 |
slamp Expert

 Joined: 23 Aug 2004 Posts: 688
          votes: 7
|
|
| Back to top |
|
 |
jinn New Poster

Joined: 13 May 2008 Posts: 6
 
|
Posted: Tue May 13, 2008 9:11 Post subject: |
|
|
The URL - jinnpod.com
Thanks. |
|
| Back to top |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Tue May 13, 2008 9:28 Post subject: |
|
|
Well, nothing is showing up in your source code for your blog.
1. Check that your Google Analytics stuff is correct for your url
2. Double check your _uacct code is in fact correct.
I could see the Analytics code in the source of my site before it started working, after 24 odd hours. _________________ See the Sites in in Venice |
|
| Back to top |
|
 |
jinn New Poster

Joined: 13 May 2008 Posts: 6
 
|
Posted: Tue May 13, 2008 9:42 Post subject: |
|
|
Can I just check with you guys and see if I did everything correctly?
1. Google Analytics site - in my website URL I put www.jinnpod.com. Is this correct? Do I have to put the add the /index.php?
2. In b2evolution admin, I installed the plugin and configured the _uacct code. That was all I did. Do I have to configure anything else? |
|
| Back to top |
|
 |
slamp Expert

 Joined: 23 Aug 2004 Posts: 688
          votes: 7
|
|
| Back to top |
|
 |
jinn New Poster

Joined: 13 May 2008 Posts: 6
 
|
Posted: Tue May 13, 2008 10:41 Post subject: |
|
|
| Yes it's enabled. |
|
| Back to top |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu May 15, 2008 8:40 Post subject: |
|
|
Hi jim,
In you skin add in between:
| Code: |
<!-- footer ends here -->
<!-- wrap ends here --> |
| PHP: |
<?php
// Trigger plugin event, which could be used e.g. by a google_analytics plugin to add the javascript snippet here:
$Plugins->trigger_event('SkinEndHtmlBody');
?>
|
Then it should work.
Good luck _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net |
|
| Back to top |
|
 |
jinn New Poster

Joined: 13 May 2008 Posts: 6
 
|
Posted: Thu May 15, 2008 23:12 Post subject: |
|
|
Hi Afwas
Thanks for your tips. I'm travelling for the next 5 days, so I can only try this out when I'm back home. I'll report my results then.
Cheers! |
|
| Back to top |
|
 |
Insanity5902 New Poster

Joined: 29 Jun 2008 Posts: 1  
|
Posted: Sun Jun 29, 2008 10:56 Post subject: |
|
|
| just an FYI, this code wasn't in my theme (PixelGreen) either, adding it was necessary. |
|
| Back to top |
|
 |
|