when running this on 4.7rc1, i am getting the http:// stripped and so Google Analytics is complaining...

eg:

_uacct = "UA-xxxxxx-1";urchinTracker();

any ideas? did drupal_add_js change?

Comments

budda’s picture

Project: Google Analytics » Drupal core
Version: 7.x-1.x-dev » 4.7.0-rc1
Component: Code » base system
Priority: Normal » Critical

Appears to be a Drupal RC1 core bug. The bug stops external server javascript from being loaded.

Steven’s picture

drupal_add_js() was not meant for external JS files. It can probably be fixed by using url($file) in drupal_add_js() instead of base_path() . url($file).

Steven’s picture

..instead of base_path() . $file.

killes@www.drop.org’s picture

Priority: Critical » Normal
Status: Active » Closed (won't fix)

Ok, let's can it, then.

seandunaway’s picture

do you think thats desirable?

budda’s picture

Hmm, so whats the solution for including javascript in from an absolute URL? :-/

budda’s picture

Project: Drupal core » Google Analytics
Version: 4.7.0-rc1 » 7.x-1.x-dev
Component: base system » Code
Status: Closed (won't fix) » Fixed

I've fixed the GoogleAnalytics module to use the basic drupal_set_html_head() function now.

budda’s picture

Status: Fixed » Closed (fixed)