The javascript generated on the page differs from the javascript provided by Crazyegg :
With the module :
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/9054.js";

Code provided by Crazyegg :
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/9054.js?"+Math.floor(new Date().getTime()/3600000);

Comments

Scott Robertson’s picture

The missing area is only used as a way of ensuring that the crazy egg tracking script isn't cached by adding a query string onto the end of the JavaScript link. This is handled automatically by Drupal, as when you call drupal_add_js(), it will attach a query string onto the end for you.

noahlively’s picture

Status: Active » Closed (fixed)

Good point, s-robertson. I'm closing the issue.

slashrsm’s picture

Version: 6.x-1.1 » 7.x-1.0
Status: Closed (fixed) » Needs review
StatusFileSize
new982 bytes

I do not agree with that. That is true when you include JS files. But here we include JS in a inline form, so nothing is added ath the end of it. It would not help even if we'd add this code in a .js file, that would be added to a module. That would only mean, that our own file is not cached. It will not affect crazyegg's include.

Attaching patch...

noahlively’s picture

I have applied the patch to the 7.x-1.x branch and pushed up to the Drupal.org git repository.

Thanks, slashrsm

tunic’s picture

Issue summary: View changes
Status: Needs review » Fixed

I think this is fixed so I'm changing status

Status: Fixed » Closed (fixed)

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

shaunlaws’s picture

I had to add a missing question mark to the patch to get it to work:

a.src=document.location.protocol+"//' . $script_host . '/' . $account_path . '?"+Math.floor(new Date().getTime()/3600000);

a.src=document.location.protocol+"//' . $script_host . '/' . $account_path . '?"+Math.floor(new Date().getTime()/3600000);

shaunlaws’s picture

StatusFileSize
new983 bytes

Patch file for comment #7