Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Configuring Google Analytics on a site with SSLConfiguring Google Analytics on a site with SSL
Previous
 
Next
New Post
8/14/2007 1:43 PM
 

Is there a way to combine the javascript for the google analytics link with the re-write javascript that switches the http/https in the address? (I only ask b/c I'm not a javascript person)

The google analytics script is:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "Your_Account_Number";
urchinTracker();
</script>

And the re-write script (from above) is:

<script type="text/javascript">
    if(location.protocol.toLowerCase() =='http:' &&
        location.href.toLowerCase().indexOf('login') > -1 ) 
             location.href = location.href.replace('http:','https:');

    if(location.protocol.toLowerCase() =='https:' &&
         location.href.toLowerCase().indexOf('login') == -1 )
             location.href = location.href.replace('https:','http:');
</script >

Then is there a way to combine the two, so that the pages that DNN serves up as SSL (the ones with https prefix) look for the "https://www.google-analytics.com/urchin.js" and the non-SSL pages (the ones with http prefix) look for the "http://www.google-analytics.com/urchin.js"?

I really don't know javascript, and I'm pretty sure that the following won't work, but what about something along the lines of:

<script type="text/javascript">
    if(location.protocol.toLowerCase() =='http:')
        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
        <script type="text/javascript">
            _uacct = "Your_Account_Number";
            urchinTracker();
        </script>
    if(location.protocol.toLowerCase() =='https:')
        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
        <script type="text/javascript">
            _uacct = "Your_Account_Number";
            urchinTracker();
        </script>
</script >

Is something like this possible? If so, it would solve the problem of the mixed content message and so we could have google analytics and selective https pages in DNN.

Thanks for any javascript suggestions that may be needed to correct my feeble attempt at code!

Ari

 

 
New Post
8/14/2007 1:58 PM
 

     I guess for support ssl , you should register code as <script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
</script>  not <script src="https://www.google-analytics.com/urchin.js" type="text/javascript"></script> . 

      I have a google analytics module . It support ssl ,can be used as module and skin object , can exclude administrator or super user activity / automatic hide it's self/ automatic display on every page / full localization support. ...... I think it works exactly as you like .

    The bad thing is ........it is not free ,you can get it from http://www.snowcovered.com/snowcovered2/Default.aspx?tabid=242&PackageID=8148


Over 20 + professional dnn modules for News Article, Store, Video Gallery, Photo Gallery, Ultra Flash Player,YouTube Video, Image Slide show, Skin Chameleon and much more from DnnModule.com
 
New Post
8/14/2007 2:21 PM
 

Google recommends to just add the secure version to all pages.

http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=31846

xiaoqi98 is correct, the url for secure should have use ssl instead of www for the host name.

<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">

Personally, I would not continue to make more complicated javascript code just for this, but technically the way you would do it is with a document.write statement:

document.write ('<' + 'script src="https://ssl.google-analytics.com/urchin.js" type="text/java' + 'script">');

 


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Configuring Google Analytics on a site with SSLConfiguring Google Analytics on a site with SSL


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out