Right now, the javascript/browser method doesn't work at all. The fourth argument to _gaq.push(), the GA Event value parameter, must always be a number but is currently always a string (everything in Drupal.settings is a string).

The Chrome GA debugger complains:

_gaq.push processing "_trackEvent" for args: "[Homepage Image,Viewed,Spring 2013,8]": ga_debug.js:25
The _trackEvent API expects a number value for argument 3. The argument given (8) was a string.

Comments

krlucas’s picture

Status: Active » Needs review
StatusFileSize
new798 bytes

Attached is a patch which converts the GA event value to a number before pushing.

krlucas’s picture

StatusFileSize
new628 bytes

Here's a smaller patch which seems to work in Chrome though I'm less sure about the syntax.

gedur’s picture

patch #2 works for me!
Nice job krlucas!

gedur’s picture

Status: Needs review » Closed (fixed)

Commited to dev branch.

  • Commit ca61ce7 on 7.x-1.x, fb-utmp, 8.x-1.x authored by krlucas, committed by GeduR:
    Issue #1969054: Fourth _gaq.push() argument always needs to be numeric