Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:58:02 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155534 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: FeedCount-Like Google Analytics Counter  (Read 665 times)
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« on: July 26, 2010, 02:53:44 AM »

Hi,

ich habe mir vorgenommen, in dieser Zeit etwas an die Community zurückzugeben,
daher hier gleich das nächste Snippet:

FeedCount-Like Google Analytics Counter
Es ist eine Portierung zu WebsiteBaker CMS in Form eines Snippets.
Das Skript selbst kommt von hier:
www.webresourcesdep ot.com

Eine Demo gibts hier:
http://www.webresourcesdepot.com/wp-content/uploads/file/google-analytics-counter/index.php

Ich habe die Advanced Version umgesetzt, es ist also nötig, dass bei Euch jQuery im Template eingebunden ist. Und zwar VOR register_frontend_m odfiles('js');

Ansonsten wird das Snippet installiert und im Template über die Funktion aufgerufen:

<?php
         google_analytics_counter(
            $yourGoogleEmail    = 'your@email.tld',
            $yourGooglePass      = 'pass',
            $yourProfileID      = '1234567890'               
            
         );
?>


Ihr könnt es auch "shorthand" eintragen:
<?php google_analytics_co unter( 'your@email.tld',  'pass', '1234567890'); ?>

WICHTIG:
Bei  $yourProfileID handelt es sich nicht um die eine, die mit UA- beginnt.
Es ist vielmehr diejenige, die in der Browser-Eingabezeile in der URL erscheint (gleich nach &id=), wenn Ihr in Google Analytics auf der Domain der zu trackenden Seite seid.


Viel Spaß,
Stefek





« Last Edit: July 26, 2010, 02:55:35 AM by Stefek » Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
bupaje

Offline Offline

Posts: 519


WWW
« Reply #1 on: April 08, 2011, 01:32:23 AM »

Hi Stefek. I was looking for something like this, found GAPI then your plugin. Can I ask if you have done more with this?

I would like to be able to set a start date - from what I see with the report id if I set the dates it would be for a specific period. I thought maybe show totals by month-to-date or year-to-date.

Also is the API called for every page load? If so I guess this would be worrisome to a busy site. Might be worth writing to a file and only calling Google every 10 or some other admin settable number.

All in all a very interesting little nugget I would like to see more of!

I know you guys are busy so I'll just put it on the wish list. Smiley
Logged

My Blog, My Site
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #2 on: April 08, 2011, 01:46:04 AM »

Hello Bupaje,

as we have legal restrictions in germany on using google analytics I won't go deeper into this.

BUT, there is another great tool on the market and it's open source (GNU GPL Licensed) and I will concentrate more on this one in the near future.
See http://piwik.org/

There is a good API for this tool and it seems being well documented.

An ideal scene would look like having some WB Snippets based on the API in order to bring some of the most important statistics onto the Frontend of WebsiteBaker (at least for loged in Users).

Kind Regards,
Stefek



Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
bupaje

Offline Offline

Posts: 519


WWW
« Reply #3 on: April 08, 2011, 02:59:43 AM »

Sounds good - thanks for this example.
Logged

My Blog, My Site
bupaje

Offline Offline

Posts: 519


WWW
« Reply #4 on: April 08, 2011, 03:41:00 AM »

You can see it implemented in a bar at the bottom of my site now

http://stormvisions.com/pages/home.php
Logged

My Blog, My Site
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #5 on: April 08, 2011, 04:13:26 AM »

Nice.

And nice Blog by the way.

Kind regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
bupaje

Offline Offline

Posts: 519


WWW
« Reply #6 on: April 08, 2011, 05:35:04 PM »

Thanks. Powered by WB. Smiley
Logged

My Blog, My Site
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!