[Plugin] Google Analytics code plugin
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions
View previous topic :: View next topic  
Author Message
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Wed Apr 30, 2008 14:55    Post subject: [Plugin] Google Analytics code plugin Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Wed Apr 30, 2008 15:28    Post subject: Reply with quote

looks cool, thank you Afwas, another useful plugin
_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Walter
Hooked :)
Hooked :)

Joined: 11 May 2004
Posts: 416
Reputation: 114.2 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 5

PostPosted: Tue May 06, 2008 15:33    Post subject: Reply with quote

Cool Afwas!

What I want is different settings of analytics for each blog Smile

DO you have any idea of how to implement that?

[]'s
- Walter

_________________
[]'s
- Walter
http://b2evolution.waltercruz.com
Back to top
View user's profile Send private message Visit poster's website
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Tue May 06, 2008 18:43    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Walter
Hooked :)
Hooked :)

Joined: 11 May 2004
Posts: 416
Reputation: 114.2 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 5

PostPosted: Tue May 06, 2008 22:52    Post subject: Reply with quote

Cool Smile

One note: the plugin is pretty good as-is Smile

_________________
[]'s
- Walter
http://b2evolution.waltercruz.com
Back to top
View user's profile Send private message Visit poster's website
jinn
New Poster
New Poster

Joined: 13 May 2008
Posts: 6
Reputation: 1.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue May 13, 2008 2:55    Post subject: Reply with quote

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
View user's profile Send private message
slamp
Expert
Expert

Joined: 23 Aug 2004
Posts: 688
Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 7

PostPosted: Tue May 13, 2008 8:10    Post subject: Reply with quote

@jinn: could you give us an URL ?
_________________
Slamp::Blog [fr]
Demo large evopress skin [fr]
Support: irc://irc.freenode.net#b2evolution
Back to top
View user's profile Send private message Visit poster's website
jinn
New Poster
New Poster

Joined: 13 May 2008
Posts: 6
Reputation: 1.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue May 13, 2008 9:11    Post subject: Reply with quote

The URL - jinnpod.com

Thanks.
Back to top
View user's profile Send private message
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Tue May 13, 2008 9:28    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jinn
New Poster
New Poster

Joined: 13 May 2008
Posts: 6
Reputation: 1.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue May 13, 2008 9:42    Post subject: Reply with quote

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
View user's profile Send private message
slamp
Expert
Expert

Joined: 23 Aug 2004
Posts: 688
Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86Reputation: 86 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 7

PostPosted: Tue May 13, 2008 10:38    Post subject: Reply with quote

@jiin is the plugin active ?
_________________
Slamp::Blog [fr]
Demo large evopress skin [fr]
Support: irc://irc.freenode.net#b2evolution
Back to top
View user's profile Send private message Visit poster's website
jinn
New Poster
New Poster

Joined: 13 May 2008
Posts: 6
Reputation: 1.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue May 13, 2008 10:41    Post subject: Reply with quote

Yes it's enabled.
Back to top
View user's profile Send private message
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu May 15, 2008 8:40    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
jinn
New Poster
New Poster

Joined: 13 May 2008
Posts: 6
Reputation: 1.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Thu May 15, 2008 23:12    Post subject: Reply with quote

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
View user's profile Send private message
Insanity5902
New Poster
New Poster

Joined: 29 Jun 2008
Posts: 1
add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Sun Jun 29, 2008 10:56    Post subject: Reply with quote

just an FYI, this code wasn't in my theme (PixelGreen) either, adding it was necessary.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
b2evolution Support Forum RSS Feed Forums powered by php Bulletin Board