CodeCanyon

Google Charts API

1849 posts
  • Has been a member for 1-2 years
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Australia
SportTipsWorld says

Anyone played around with this ?

Would like some advice please.

We wish to show , charts for:

today

this week

this month

this year

Example of todays clicks, want to know how we can propagate the data.

If this is something you have played with, let me know please.

( we will be serving the data from mysql )

Need the y axis to be dynamic and stretch to max clicks , etc. Also need to know how to get data in, etc.

1 year ago
1703 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Community Moderator
  • Author had a Free File of the Month
  • Beta Tester
  • Exclusive Author
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Australia
  • Referred between 200 and 499 users
1849 posts
  • Has been a member for 1-2 years
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Australia
SportTipsWorld says

like:

http://dtbaker.com.au/random-bits/google-analytics-php-api.html ?

Yep !

How do you fancy creating a daily weekly monthly analytics model for us mate ?

I ask because the recent about.me dashboard has some quite funky analytics ( akin to what you demoed above )

This would fit right in with our project.

My issue is I am utter pants at php ( my business partner is a whizz ) possibly not as adept as you. We will be fetching and storing data from multiple pages for new site we are creating.

So really need to be able to shoehorn this in.

If its something your interested in, would appreciate some feedback, plus your local… and I reckon if you wanted to, we would love to bring you onboard. The site will be massive.

Cheers Ste

1 year ago
1703 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Community Moderator
  • Author had a Free File of the Month
  • Beta Tester
  • Exclusive Author
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Australia
  • Referred between 200 and 499 users
dtbaker says

It’s quite easy. I built that chart in 15 mins this morning.

First, create a chart using Googles wizard here: http://code.google.com/apis/chart/docs/chart_wizard.html

Put some real data into the wizard from your system, then copy the image url that google spits out, and then you simply replace parts of the image url with PHP to draw in your own systems data.

Wont be able to assist with any new projects until late Jan. So hit me up then if you are still in need.

1 year ago
dtbaker is a moderator
1849 posts
  • Has been a member for 1-2 years
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Australia
SportTipsWorld says

Cheers Dave,

Had played with the API .

I guess My issue was getting the data into the charts, as i said I am a knob when it comes to that sort of stuff..

Will have a word with Ky ( my buisness partner ) when he is back , and have a play.

Yer, if and when you have a free day or so, gimme a shout and see what we can do :) Im only an hour from you.

1 year ago
1703 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Community Moderator
  • Author had a Free File of the Month
  • Beta Tester
  • Exclusive Author
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Australia
  • Referred between 200 and 499 users
1849 posts
  • Has been a member for 1-2 years
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Australia
SportTipsWorld says

Thanks for doing that ! Awesome, gives us and others a head start :) cheers

1 year ago
96 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 1 and 100 dollars
  • Bought between 50 and 99 items
  • Netherlands
  • Referred between 1 and 9 users
1849 posts
  • Has been a member for 1-2 years
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Australia
SportTipsWorld says

Ok I am slow, but finally sat down and started to try to implement this.

Unless gapi.class ( has changed ) just downloaded latest build. I have only uploaded gapi.class.php to our server.

I also created item_analytics.php page using your code from your snipplr.

I changed the GA account email and pass, to match our analytics stuff. I also added our ga id.

But I keep getting error message. When we run the script.

I have checked dbl checked and triple checked our GA access details, and all are good. Any suggestions what could be causing the error ?

Ignore me , now working. Not sure what happened there.

4 months ago
1849 posts
  • Has been a member for 1-2 years
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • Australia
SportTipsWorld says

O this is really cool. Good work Dave. ................. I have some questions hopefully not to far off the beaten track, I havent played with GA before.

We are creating a site with tons and tons of client content ( for sale stuff ) So eg. a typical site page maybe www.domain.com/forsale/itemid_12345

Thats just a very crass example. We have GA on every single page of the site.

A user may list say 3 itmes for sale, the ids of which are arbitrary but are fetched from our db. They could be : itemid_12345 , itemid_23456,itemid_333456

etc. So I am trying to create a analytics module in their usercp, where they can view analytics for their ads. Essentially what I want to do, is onlick fetch results for a particular itemid_xxxxx and display it to that user. Can we do this on the fly ..

I notice in our analytics code we have: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxx-1']); _gaq.push(['_setDomainName', 'domain.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); })();

track pageview etc, but can we inject into this somehow an item id. ( same as the page id used to fetch the ad details for a particular page )

I am betting this is a function already and my ineptitude is showing .. just wanted some pointers. We cannot go into analytics and add every single page as a individual page to our analytics ,it would get mad.

Lastly apologies but , can you give some examples somewhere of other data we can parse and represent on page, like on your web page . Pie charts, visitor countries, referring urls , browser stuff etc…

4 months ago
by
by
by
by
by