Posted by cytefx on August 26, 2009 at 12:58pm
| 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
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
#2
variable_get should always have a default value, even if it is variable_get('something', '');
Otherwise, looks good.
#3
Re-rolled patch, to include the default values for variable_get on the new https variables.
#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.
#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?