Extension: Google Analytics

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Extension: Google Analytics

Postby Wim » Tue Jun 09, 2009 9:02 pm

NB!

The latest version of this extensions is available from extensions.pivotx: http://extensions.pivotx.net/entry/14/googleanalytics

------------------------------------------------------------------------------------------------------------------------

Extension Name: Google Analytics
Extension Author: Wim Bekkers / Bob den Otter
Download Location: see attachment

Extension Description

    Add the Google Analytics code to your PivotX pages with full control over tracking code customization.

    As a pre-requisite you need a Google Analytics account (of course!). In the extension configuration page within the PivotX dashboard you need to enter your UA code (looks like UA-xxxxxx-x) and you are ready to go.

    If you want to get the most out of your Google Analytics, then you may want to use the Advanced Customization options that are available. These allow you to track subdomains within one profile, setup your custom campaigns, change the session timeout limit, and use Google Analytics in combination with Urchin. All these settings can be managed from the extension configuration page.

Installation

    Step 1: Unpack the attached zip file in the pivotx/extensions/ directory on your server
    Step 2: in the PivotX admin menu go to the Extensions section and enable the googleanalytics hook extension
    Step 3: enter your UA code in the Extensions -> Configure Extensions -> googleanalytics section of the PivotX dashboard. Ignore all the other advance settings unless you know what you are doing!

As always: please provide feedback here in the forum!

Version 1.7.2 is now the latest version. Contains 2 new options: setting the path variable for the cookies and switching off display of stats in the dashboard. The latter doesn't work any more because the new API has not been incorporated yet. Anyone who wants to do that please feel free.
Last edited by Wim on Thu Oct 07, 2010 9:15 pm, edited 2 times in total.
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: Google Analytics

Postby hansfn » Wed Jun 10, 2009 11:32 am

Thx a lot for the contribution. We really need the help of the community to get PivotX running and extensions are crucial.

The code looks fine, too. (You have a mix of Unix and Dos line-endings in the file, but that isn't a problem.)
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Extension: Google Analytics

Postby Kevin » Wed Jun 10, 2009 3:50 pm

This will make a fine addition to extensions.pivotx.net. *cough* ;)
BlogThemesExtensionsDocumentation • Support PivotX - Click the Donate button today!
User avatar
Kevin
Administrator
 
Posts: 106
Joined: Tue Nov 20, 2007 9:58 pm
Location: Nova Scotia, Canada

Re: Extension: Google Analytics

Postby Wim » Wed Jun 10, 2009 3:58 pm

hansfn wrote:The code looks fine, too. (You have a mix of Unix and Dos line-endings in the file, but that isn't a problem.)


;) Sharply observed! That is when you take an existing extension as a template and move it back and forth between Linux and Windows.
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: Google Analytics

Postby hansfn » Wed Jun 10, 2009 4:05 pm

One other minor issue: Since this really is a hook and not a snippet (=template tag), the file should have been called hook_googleanalytics.php in stead of snippet_googleanalytics.php.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Extension: Google Analytics

Postby Wim » Wed Jun 10, 2009 4:07 pm

Kevin wrote:This will make a fine addition to extensions.pivotx.net. *cough* ;)


I have just added this to the uservoice forum as an idea to finish up extensions.pivotx.net. I guess the more votes the higher the priority this will get from the PivotX development team?
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: Google Analytics

Postby Wim » Wed Jun 10, 2009 4:11 pm

hansfn wrote:One other minor issue: Since this really is a hook and not a snippet (=template tag), the file should have been called hook_googleanalytics.php in stead of snippet_googleanalytics.php.


Yes, this is where I am missing the documentation since I never seem to be sure what makes it a hook or a snippet (the widget thing I figured out in the mean time).

But you are right of course, I will change this and call it hook_googleanalytics.php instead.
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: Google Analytics

Postby Wim » Wed Jun 10, 2009 5:27 pm

Wim wrote:I will change this and call it hook_googleanalytics.php instead.


Version 0.2X is out now. The only change is that it is now a hook extension (instead of a snippet).
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: Google Analytics

Postby Kevin » Wed Jun 10, 2009 10:28 pm

Wim wrote:
Kevin wrote:This will make a fine addition to extensions.pivotx.net. *cough* ;)

I have just added this to the uservoice forum as an idea to finish up extensions.pivotx.net. I guess the more votes the higher the priority this will get from the PivotX development team?

I tossed 3 points on this one. Great idea. ;) Peter is a super busy guy these days.. but he does such great work on the site design/functionality. We love you Peter! :ugeek:
BlogThemesExtensionsDocumentation • Support PivotX - Click the Donate button today!
User avatar
Kevin
Administrator
 
Posts: 106
Joined: Tue Nov 20, 2007 9:58 pm
Location: Nova Scotia, Canada

Re: Extension: Google Analytics

Postby nicklnro » Fri Jun 12, 2009 5:37 am

Wim wrote:Desperately looking for testers for this extension!


I tested it, it works great. I am using Firefox 3.5 beta, that updated yesterday to 3.5 Preview and the Wysiwyg in the entry/page posting was no longer showing. I disabled the Google Analytics hook and tried again. Still no result. I believe it's a bug in the preview version of Firefox 3.5. Maybe the developers of PivotX will look into this.

Congratulations, Wim, great work!
nicklnro
 
Posts: 2
Joined: Fri Jun 12, 2009 5:33 am

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 8 guests

cron