I've enabled the cookie_googleanaltyics module and get the following error.

http://www.mysite.com/function%20ccAddAnalytics%28%29%20%7B%0Asites/all/themes/omega/js/omega.js%0A%7D?m4f7v3 403 (Forbidden)

It seems to come from the cookie_googleanalytics_js_alter() function. If I output $script, it looks like following is also being produced.

function ccAddAnalytics() {
  sites/all/themes/omega/js/omega.js
}

Everything seems to work though.

Comments

tce’s picture

Looking at it again, I think the strpos($script['data'], 'ga.js') > 0 is matching the ga/js part of the string from /all/themes/omega/js/omega.js. I changed it to:

<?php
if (is_string($script['data']) && strpos($script['data'], 'google-analytics.com/ga.js') > 0) {
?>

and it's fixed the problem.

budda’s picture

Assigned: Unassigned » budda

the problem with including the full domain is that when the ga.js is cached locally on the server the domain wont be in the path.
But yes it is the reason why omega.js is being caught.

Maybe "/ga.js" is the best match.

budda’s picture

Status: Active » Fixed

Fixed in dev branch and dev snapshot when it rebuilds.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

typo