WordPress.org

Making WordPress.org

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#268 closed defect (fixed)

Update Quantcast script to support https without SSL erros

Reported by: ocean90 Owned by: nacin
Priority: normal Component: General
Keywords: Cc:

Description

Reported by Mike.

The new code block:

<script type="text/javascript">
  var _qevents = _qevents || [];
  (function() {
   var elem = document.createElement('script');
   elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge")
               + ".quantserve.com/quant.js";
   elem.async = true;
   elem.type = "text/javascript";
   var scpt = document.getElementsByTagName('script')[0];
   scpt.parentNode.insertBefore(elem, scpt);  
  })();
</script>

Source: Using the Quantcast Asynchronous Tag

Attachments (2)

268.patch (1.2 KB) - added by ocean90 4 months ago.
268.2.patch (1.3 KB) - added by mikemanger 4 months ago.
Load Quantcast script in head

Download all attachments as: .zip

Change History (4)

ocean904 months ago

comment:1 nacin4 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 223:

Trac: Update Quantcast tag to be async and SSL-aware.

props ocean90, mikemanger.
fixes #268.

mikemanger4 months ago

Load Quantcast script in head

comment:2 mikemanger4 months ago

Thanks for making the ticket.

The linked source recommends putting the first block at the end of the document's <head>. Not sure if it will break the tracking if it is not?

Otherwise, you can just merge the two script tags together.

Note: See TracTickets for help on using tickets.