Using the new-style Google Analytics pageTracker functions in Interchange
For a while now there have been two different ways to setup the JavaScript calls to report traffic back to Google Analytics. The older method uses functions names that mention “urchin,” while the newer method uses a function named “pageTracker”. This post describes an approach for using the new method at a standard Interchange store.
You can see an example of the new method of reporting a page view here. Nothing Interchange-related is required for normal page tracking, but you may want to use a variable for the Google Account Number, of which more below.
If you have your Google Analytics account setup to treat the website as an E-commerce site, then you can also add the order tracking tags to your receipt page, so that it sends order data over to Google Analytics at the time of conversion. The order tracking tags can be viewed here. This gist shows the typical Interchange tags you might want to use to transmit the order specifics. Of course you might need to change the field used for the category for the products since not everyone uses the prod_group field from the products table to hold this information.
As you can see, both normal and the order-conversion scripts need to be …
interchange analytics
The importance of offline community
Today, the June issue of the Open Source Business Review debuts. It features nine women who are active in open source development—as developers, organizers and business leaders.
I wrote about offline community, and how techies in Portland, OR manage to get connected to each other, and how they’ve encouraged participation from women. You don’t often find women at a user group or even a tech-focused meetup at a restaurant or bar. Portland, somehow, has managed to encourage the women in the community to participate and lead. I talk about what I think the factors were that led to the higher percentage of women involved in the community today.
Let me know what you think!
community
Git rebase: Just-Workingness Baked Right In (If you’re cool enough)
Reading about rebase makes it seem somewhat abstract and frightening, but it’s really pretty intuitive when you use it a bit. In terms of how you deal with merging work and addressing conflicts, rebase and merge are very similar.
Given branch “foo” with a sequence of commits:
foo: D --> C --> B --> A
I can make a branch “bar” off of foo: (git branch bar foo)
foo: D --> C --> B --> A
bar: D --> C --> B --> A
Then I do some development on bar, and commit. Meanwhile, somebody else develops on foo, and commits. Introducing new, unrelated commit structures.
foo: E --> D --> C --> B --> A
bar: X --> D --> C --> B --> A
Now I want to take my “bar” work (in commit X) and put it back upstream in “foo”.
- I can’t push from local bar to upstream foo directly because it is not a fast-forward operation; foo has a commit (E) that bar does not.
- I therefore have to either merge local bar into local foo and then push local foo upstream, or rebase bar to foo and then push.
A merge will show up as a separate commit. Meaning, merging bar into foo will result in commit history:
foo: M --> X --> D --> C --> B --> A
\
E --> …
spree git
PostgreSQL with SystemTap
Those familiar with PostgreSQL know it has supported DTrace since version 8.2. The 8.4beta2 includes support for several new DTrace probes. But for those of us using platforms on which DTrace doesn’t exist, this support hasn’t necessarily meant much. SystemTap is a relatively new, Linux-based package with similar purpose to DTrace, available on Linux, and is under heavy development. As luck would have it, PostgreSQL’s DTrace probes work with SystemTap as well.
A few caveats: it helps to run a very new SystemTap version (I used one I pulled from SystemTap’s git repository today), and in order for SystemTap to have access to userspace software, your kernel must support utrace. I don’t know precisely what kernel versions include the proper patches; my Ubuntu 8.04 laptop didn’t have the right kernel, but the Fedora 10 virtual machine I just set up does.
Step 1 was to build SystemTap. This was a straightforward ./configure, make, make install, once I got the correct packages in place. Step 2 was to build PostgreSQL, including the –enable-dtrace option. This also was straightforward. Note that PostgreSQL won’t build with the –enable-dtrace option unless you’ve already …
postgres
Google I/O 2009 day 1
I’m at Google I/O at the Moscone Center in downtown San Francisco, and today was the first day. Everything was bustling:
The opening keynote started with Google CEO Eric Schmidt, and I was worried wondering how he would make over an hour be interesting. He only took a few minutes, then Vic Gundotra, VP of Engineering, led the rest of the keynote which had many presenters showing off various projects, starting with 5 major HTML 5 features already supported in Chrome, Firefox, Safari, and Opera:
Matt Waddell talked about Canvas, the very nice drawing & animation API with pixel-level control. Brendan Gibson of Backcountry.com used this at SteepandCheap.com and sister sites for the cool People on Site graphs (with a workaround for Internet Explorer which doesn’t support Canvas yet). Also a quick demo of Bespin, an IDE in the browser.
Matt Papakipos showed off o3d, 3-D in the browser with just HTML 5, JavaScript, and CSS. Also the new <video> tag that makes video as easy as <img> is. Geolocation has come a long way with cell tower and wi-fi ID coverage over much of the globe.
Jay Sullivan, VP of Mozilla, showed off Firefox 3.5’s upcoming features. Basically all of the …
conference
Writing Procedural Languages — slides
Although I’ll be working to change this, the slides for my “Writing a PostgreSQL Procedural Language” tutorial available from the PGCon website are from an earlier iteration of the talk. The current ones, which I used in the presentation, are available here, on Scribd.
conference postgres
PGCon thus far
Though it might flood the End Point blog with PGCon content, I’m compelled to scribble something of my own to report on the last couple of days. Wednesday’s Developers’ Meeting was an interesting experience and I felt privileged to be invited. Although I could only stay for the first half, as my own presentation was scheduled for the afternoon, I enjoyed the opportunity to meet many PostgreSQL “luminaries”, and participate in some of the decisions behind the project.
Attendance at my “How to write a PostgreSQL Procedural Language” tutorial exceeded my expectations, no doubt in part, at least, because aside from the Developers’ Meeting it was the only thing going on. Many people seem interested in being able to write code for the PostgreSQL backend, and the lessons learned from PL/LOLCODE have broad application. It was suggested, even, that since PL/pgSQL converts most of its statements to SQL and passes the result to the SQL parser, PL/LOLCODE would have less parsing overhead than PL/pgSQL. Ensuing discussions of high performance LOLCODE were cancelled due to involuntary giggling.
Between talks I’ve had the opportunity to meet a wide variety of PostgreSQL users and contributors, …
conference postgres
PgCon: the developer’s meeting and the 2009 keynote
Yesterday, I spent the entire day at a Postgres Developers meeting, discussing what happened over the last year, and how we’re going to tackle a series of critical problems in the next year. We talked about how to get the Synchronous Replication and Hot Standby patches completed, important adoption issues, our continued participation in the SQL Standards committee (a surprising number of people were interested!), moving forward with alpha releases after commitfests (woo!), and creating a better infrastucture for managing modules and addons to Postgres.
That evening, a few of us were treated by Paul Vallee of Pythian Group to dinner and a trip to another of Ottawa’s great local pubs. We discussed the future of open source databases and the relative quality of beer in Ottawa, Portland and the UK. Of course, I think Portland has the best beer ;)
This morning, Dan introduced everyone to the start of the sessions, and then Dave, Magnus and I managed to get through the keynote. It was mostly an opportunity to announce 8.4 Beta2, plug a few of the talks and mention all the different individuals involved in development. And have a laugh about our conference tshirts.
I have an hour and a …
conference postgres