Yii Framework Forum: [Extension] (TP) Google Analytics - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] (TP) Google Analytics Rate Topic: -----

#1 User is offline   MisterPhilip 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-November 10

Posted 07 May 2012 - 01:19 AM

This is the discussion thread for the (TP) Google Analytics extension.

Basic Overview
I've finished up development of the first of many different extensions to implement various web analytic tools (Google Analytics, Yahoo! Web Analytics, Adobe SiteCatalyst, etc.) I've specialized in web analytics for the past 3 years and my aim with these extensions is to help other developers get the most data into their web analytic tools as easily as possible. This first extension is for Google Analytics which is a fairly straight-forward tool.

Where can I download/see documentation for this?
Since I'm under the required 10 (?) posts on the forum I cannot post in the Extensions directory… however, I do have everything up on Google Code. Perhaps a moderator could edit this to include the URL, ha. Search for the project "yii-analytics" or add /p/yii-analytics to the end of code.google.com This is where all of the analytic-related extensions I create will be hosted in the event you use something other than Google Analytics.

What I'm looking for
I'm looking for feedback pretty much everything, but mainly around the ease of use and the performance of the extension for you.
0

#2 User is offline   SherifMedhat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 27-August 11

Posted 08 October 2012 - 10:02 AM

Go and publish your extension on the extensions' portal of Yii :)
0

#3 User is offline   MisterPhilip 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-November 10

Posted 10 October 2012 - 12:51 AM

Consider it added! http://www.yiiframew...ogle-analytics/
0

#4 User is offline   PrplHaz4 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 107
  • Joined: 28-September 09
  • Location:Boston, MA

Posted 13 June 2013 - 07:37 AM

What is the best way to deal with dev/test sites? There is no way to disable the extension globally - do you just use different filters/profiles to separate out the sites?

Also, interested in knowing if you're using any special magic for attaching events to button/link clicks...etc. Seems like there isn't really an elegant way to do it, other than adding a script block to each view and jq binding to the element id.

Thanks for the extension!
0

#5 User is offline   PrplHaz4 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 107
  • Joined: 28-September 09
  • Location:Boston, MA

Posted 13 June 2013 - 07:58 AM

View PostPrplHaz4, on 13 June 2013 - 07:37 AM, said:

What is the best way to deal with dev/test sites? There is no way to disable the extension globally - do you just use different filters/profiles to separate out the sites?

Also, interested in knowing if you're using any special magic for attaching events to button/link clicks...etc. Seems like there isn't really an elegant way to do it, other than adding a script block to each view and jq binding to the element id.

Thanks for the extension!


rhomb from yii IRC had a great idea for attaching events to elements:

Quote

<rhomb> nicest way I can imagine from the top of my head would be a tiny widget, which on initalization gets an array in the format array('selector' => 'eventToRaise') and just handles it from there


maybe something like:
Yii::app()->googleAnalytics->attachEvents(array('#mylink' => array('Videos', 'Play', 'Baby\'s First Birthday')));

0

#6 User is offline   MisterPhilip 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-November 10

Posted 14 June 2013 - 01:21 PM

Hey PrplHaz4 -

There are a few ways of dealing with dev sites.

  • Leave the configuration as-is on site, and filter into different profiles in GA
  • Use different configuration files to send to different web properties in GA
  • Use different configuration files to send data to a dummy account ID (e.g. UA-000000-0). You can still see the requests being sent to GA, but won't see any data in any reports (since the account doesnt exist).


Re: Links, that is one way to do it. I'll tinker with it.
1

#7 User is offline   PrplHaz4 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 107
  • Joined: 28-September 09
  • Location:Boston, MA

Posted 14 June 2013 - 04:38 PM

Thanks Philip, very helpful!
0

#8 User is offline   Solid 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 29-December 12
  • Location:Kristiansand, Norway

Posted 27 September 2013 - 06:40 AM

Hi.

I encounted a problem with _trackEvent on functions with $this->redirect as the code would never be printed to a document, thus never sendt to ga.js.

Is there a good way to handle this?
I was toying with the possibility to add a function similar to the flashmessages, but with eventTrackings instead. That way you could execute all trackings done in the controller, even to you redirect.

I hit a dead end, cus i cant seem to get a handle on multiple entries to one setState name.

Something to add, what do you think?

Thanks for a great extension!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users