ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Google Analytics with ssl pages
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Google Analytics with ssl pages

 Post Reply Post Reply
Author
Message
Nothing View Drop Down
Newbie
Newbie
Avatar

Joined: 02-November-2005
Location: Canada
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nothing Quote  Post ReplyReply Direct Link To This Post Topic: Google Analytics with ssl pages
    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"" 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"" 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.



Edited by Nothing - 19-July-2006 at 6:23pm
Back to Top
dcunningham View Drop Down
Newbie
Newbie
Avatar

Joined: 08-July-2006
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote dcunningham Quote  Post ReplyReply Direct Link To This Post Posted: 09-September-2006 at 11:39am
Thanks for the tip
Back to Top
Nothing View Drop Down
Newbie
Newbie
Avatar

Joined: 02-November-2005
Location: Canada
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nothing Quote  Post ReplyReply Direct Link To This Post 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 here.

I used the 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)



Edited by Nothing - 28-September-2006 at 3:47am
Back to Top
dcunningham View Drop Down
Newbie
Newbie
Avatar

Joined: 08-July-2006
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote dcunningham Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Nothing View Drop Down
Newbie
Newbie
Avatar

Joined: 02-November-2005
Location: Canada
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nothing Quote  Post ReplyReply Direct Link To This Post 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 SWF-Object for embedding flash. Great code!

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.094 seconds.