It seems after looking at my own html output and scouring over ubercart documentation, that there is no setup for Google Checkout completed purchases to be reported in Google Analytics. The essential code required for this as described in the Using Google Analytics to Track Google Checkout Orders article does not exist on the 'cart' page.

I am selling digital content which has no checkout completion page beyond the GC completion page. This may have a role in it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Did you install the separate google analytics module?

Island Usurper’s picture

Assigned: Unassigned » Island Usurper
Status: Active » Needs review
FileSize
1.67 KB

Looks simple enough. The google analytics module will be required to add the scripts to the cart page, so all this patch does is add the form element to the Google Checkout form.

From what I can tell, that's all that needs to happen besides sending the data with the Checkout Request.

clevername’s picture

Great, I've applied the patch and will let you know if it's working once I get some GC checkouts completed.

One other thing: Is the additional ga_post.js JavaScript call not required on the cart page with how ubercart handles functions, or will I still need to implement this?

Island Usurper’s picture

I don't think it needs to be, since uc_google_checkout does server-to-server checkout requests. That's very fortunate, since I couldn't find a way to add an external JavaScript file from the module.

clevername’s picture

Hmm, after over a week of sales, I'm still not seeing any data in my Analytics console. I'm not good enough at coding to figure out what's missing, but if I can provide any output data from my own site, I'll be more than happy to.

Island Usurper’s picture

FileSize
1.67 KB

Oof. There was a typo in the patch. That last change looks in the wrong place for the analytics data. Revert changes and try this patch.

chazz’s picture

I'll test path nr. 6 this evening as I am also looking for this feature

TR’s picture

I'm willing to commit this if someone can give it a good test.

Island Usurper’s picture

Version: 6.x-2.0-beta3 » 6.x-2.x-dev
Status: Needs review » Fixed
FileSize
2.73 KB

As it turns out, the ga_post.js is required, and I think because of the version of ga.js that googleanalytics.module uses, Google also says it should go in the header which is different from the default setting that puts it in the footer.

It's required because there is also supposed to be an onsubmit callback for the form that actually fills out the analyticsdata element. I suppose a lot can happen in a year...or two.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.