when "Locally cache tracking code file" is enabled in a web site with i18n enabled too, the path to the cached tracking code is prefixed with the language label ex:

/it/sites/sitepath/files/googleanalytics/ga.js

resulting with 0 visit tracked...

Comments

hass’s picture

Status: Active » Closed (cannot reproduce)

Reviewed the code, url() is in place and also looked at the source code on my box. Cannot repro.

URL is correctly build:

ga.src = "/drupal6/de/files/googleanalytics/ga.js";
d.sibaud’s picture

Status: Closed (cannot reproduce) » Active

yes, but if you try to get the /drupal6/de/files/googleanalytics/ga.js file it give you a Page not Found 'cause the path is incorrect for a file, the correct path would be /drupal6/files/googleanalytics/ga.js.

Am I wrong?

hass’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new2.09 KB

Ok, here is a patch.

hass’s picture

StatusFileSize
new2.2 KB
hass’s picture

StatusFileSize
new2.2 KB
hass’s picture

StatusFileSize
new2.2 KB

Damn testing infrastructure

hass’s picture

Version: 6.x-3.x-dev » 7.x-1.x-dev
StatusFileSize
new2.12 KB
d.sibaud’s picture

thank you hass! I'll give you a feedback in a day.

hass’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
hass’s picture

#6: ga_i18n_path_6.patch queued for re-testing.

hass’s picture

Status: Needs review » Fixed

Committed slightly changed versions to 6.x-3.x and 7.x-1.x.

hass’s picture

Title: i18n and "Locally cache tracking code file" » URL to locally cached ga.js is broken with i18n language path prefix

Status: Fixed » Closed (fixed)

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

tobiberlin’s picture

Version: 6.x-3.x-dev » 6.x-3.0
Status: Closed (fixed) » Active

Hi,

I want to re-open this issue for 6.x-3.0 version - I wondered in one project of mine why there were so few visitors and checked my code via http://sitescanga.com/. It claimed that the ga.js have not been found in 100 % of all pages. When I turned off the locally caching and checked it again the code seemed to be ok and the JavaScript was found in all pages. When I checked by code directly I found out that the language prefix is still added to the path for the locally cached JavaScript file so the path is incorrect.

Greez,
Tobias

hass’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Status: Active » Closed (fixed)

This bug will be fixed in 3.1 or later. Go without local caching for now or try dev version, please.

bcmiller0’s picture

we are also having this issue with PURL group pages.

Our page is this http://www.allplayers.com/g/apaches (and g/apaches is from PURL).

it is looking for http://www.allplayers.com/g/apaches/sites/default/files/googleanalytics/...

and getting a 404 when it should be using http://www.allplayers.com/sites/default/files/googleanalytics/ga.js
as the URL.

I'm going to try the patch in #10 to see if that fixes our issue.

bcmiller0’s picture

after apply patch in #10, it did indeed seem to fix our PURL issue.

thanks

tomsm’s picture

subscribing

bcmiller0’s picture

this appears to be fixed in latest release 6.x-3.1. I have pulled this release and from inital test seems fixed.