Per Google's Experiment docs (https://support.google.com/analytics/answer/1745216) the experiment script should be rendered directly after the opening head tag.

CommentFileSizeAuthor
#1 script-location-wrong-2381415-1.patch472 bytesbmarshall
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bmarshall’s picture

Assigned: bmarshall » Unassigned
Status: Active » Needs review
FileSize
472 bytes

This patch sets the script element's weight to -99999999999 so it get's rendered directly after the head tag.

deggertsen’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for this.

  • nonsie committed 8f731ef on 7.x-1.x authored by bmarshall
    Issue #2381415 by bmarshall: Experiment script needs to be moved...
nonsie’s picture

Status: Reviewed & tested by the community » Fixed

This has been commited

Status: Fixed » Closed (fixed)

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

lamp5’s picture

I am using this module but w3 validator say that i have got error "A charset attribute on a meta element found after the first 1024 bytes".
Now i have got enable rdf module to provide support for schema.org and i think that this context should add this script after "<meta charset="utf-8">" tag.

lamp5’s picture

Version: 7.x-1.0 » 7.x-1.1