There's also a problem with calling this on cron because then it's uid 0 and the access check in google_analytics_api doesn't work.

I've updated the code here to use uid 1 for this one specific piece. Ideally we would just remove that permission check from the API call, but until that's done...

Comments

greggles’s picture

Status: Active » Needs review

bah.

greggles’s picture

Oh, this also fixes the uninstaller a bit and makes sure that the table doesn't cause primary key problems when it tries to insert multiple metrics.

dstol’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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