Print Page | Close Window

Google Analytics with ssl pages

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=327
Printed Date: 06-October-2024 at 4:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Google Analytics with ssl pages
Posted By: Nothing
Subject: Google Analytics with ssl pages
Date Posted: 19-July-2006 at 6:22pm

Hello all
Just thought i would share the code i'm using for google stats (Google Analytics) on ssl and non ssl pages. I was getting security warnings on ssl pages from the google javascript files pulling from a non ssl source. the below code and adjustments fixed the issue.

In your google stats settings, you need to modify your site url to unlcude https:// - not just http://  (located in the 'Main Website Profile Information' settings)

I've added the below code just above the <body> tag. remember to replace  'YourAccountNumber' with your own account info.

-->
<%
If Request.ServerVariables("HTTPS") = "on" Then
Response.Write("<script src="" https://ssl.google-analytics.com/urchin.js - https://ssl.google-analytics.com/urchin.js "" type=""text/javascript""></script>")
Response.Write("<script type=""text/javascript"">_uacct = ""YourAccountNumber"";urchinTracker();</script>")
Else
Response.Write("<script src="" http://www.google-analytics.com/urchin.js - http://www.google-analytics.com/urchin.js "" type=""text/javascript""></script>")
Response.Write("<script type=""text/javascript"">_uacct = ""YourAccountNumber"";urchinTracker();</script>")
End If
%>
<--

Your google account should now accept ssl connections and non ssl connections to the google urchin servers, as needed.

... acutally, I would think only adding the https:// settings in your google 'Main Website Profile Information' would also work in removing the security warnings, but then all your google.urchin traffic would go via ssl....

- i did not write the code. thank you if you did.

nothing.




Replies:
Posted By: dcunningham
Date Posted: 09-September-2006 at 11:39am
Thanks for the tip


Posted By: Nothing
Date Posted: 28-September-2006 at 3:41am
on the same note....

I added a flash banner to my header page without any problems, but during the log in/checkout process (https connection) I started getting an error again...

"This page contains both secure and non secure items Do you want to display the secure or non secure ?"

it seems there are far better ways to embed flash in html than how Flash MX does it by default. Read more http://blog.deconcept.com/2005/12/15/internet-explorer-eolas-changes-and-the-flash-plugin/ - here .

I used the http://blog.deconcept.com/swfobject/ - SWFObject code to fix the ssl errors mentioned above, and at the same time it fixed the "click here to activate active content" issue as well (IE6+)

(works great for passing variables from PC to flash as well)



Posted By: dcunningham
Date Posted: 28-September-2006 at 12:15pm
Do you have some code snippets and URL names that you modified to make this warning box disappear. I'm getting it on every page where I have the Godaddy seal in the footer file. Its very annoying for both me and a customer.

Thanks.


Posted By: Matt
Date Posted: 30-September-2006 at 3:12pm

Hello dcunningham,

ProductCart uses relative links (e.g. href="viewcart.asp") so the URL will change between "https://" and "http://" automatically, and as required.

In the case of some Site Seals you are given a link to an unsecured absolute URL (e.g. http://seal.starfieldtech.com/verifySeal). 

However, now days most site seals are designed to use the “https://” secure protocol. Check your GoDaddy secure seal link.  It should read something like this href=javascript:lnk_f('https://seal.starfieldtech.com/verify Seal’). 


In short, change your site seal to "https://" and make sure the rest of the links on your site are “https://”, or relative, and your messages should go away.



Posted By: Nothing
Date Posted: 16-November-2006 at 12:03am
Hi dcunningham
you can see an example of the above code at

http://www.muffetandlouisa.com     (copy paste link)

The main sub pages also display random products from specific sub categories… although I think that was a question from another thread….

The above link uses the http://blog.deconcept.com/swfobject/ - SWF-Object for embedding flash. Great code!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net