Download & Extend

Current implementation does not allow for https on certain requests

Project:Omniture Integration
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

The current implementation of the code, has 2 urls, one for the js code and one for the location of the image (used in the no script)

If you have a larger site that uses SSL for some requests you would have to put these both to ssl to avoid issue with users seeing page insecure issues thought the browser.

To fix this I am suggesting putting in another 2 fields that get called if the page called is in secure (HTTPS) mode. If you have not filled these in then the default will be your existing values.

Comments

#1

Status:active» needs review

Here is a patch to include an extra 2 variables that allow for the secure locations of the files, the module will now switch to use the secure variables if the page is requested in a https session

AttachmentSize
omniture-559988.patch 3.17 KB

#2

Status:needs review» needs work

variable_get should always have a default value, even if it is variable_get('something', '');

Otherwise, looks good.

#3

Status:needs work» needs review

Re-rolled patch, to include the default values for variable_get on the new https variables.

AttachmentSize
omniture-559988.patch 3.58 KB

#4

I'm not so sure about this change:

<?php
-      if (isset($omniture_hooked_vars['variables'])) {
+      if ((
$omniture_hooked_vars['variables'])) {
?>

The isset should prevent E_NOTICE warnings from PHP.

#5

the removal of the isset was an error in the patch, ill reroll it to leave that in

#6

Hey,

Just found this having already come up with an alternate fix, so posting the patch for you to consider versus the existing one.

This patch doesn't have the extra form fields, but does make the assumption that the SSL location for the image and js will be the same as the non-SSL.

AttachmentSize
omniture-559988.patch 4.26 KB

#7

Just found out from pifantastic that you can have protocol relative URLs:

//site.com/path_to_omniture_script.js

as mentioned here:

http://blog.httpwatch.com/2010/02/10/using-protocol-relative-urls-to-swi...

I'll rework the patch to just include some informational messaging about this.

#8

Does this method work across all browsers correctly as that article mentions issues with ie and css. I know we are talking about js here but would need to be checked, maybe an option flag if you want full urls still in there?

nobody click here