If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Sideboxes / Non-Secure Side Box for Google Adv

Non-Secure Side Box for Google Adv

Started by prabhatm on 23 Jul 2015, 5:40 AM · Views: 6,293

Results 1 to 4 of 4
23 Jul 2015, 5:40 AM
#1
prabhatm avatar

prabhatm

New Zenner

Join Date:
Jun 2015
Location:
Delhi, India
Posts:
32
Plugin Contributions:
0

Post #1 by prabhatm

I am just 2-3 weeks old to Zen cart and PHP. So forgive me if it I don't make much sense.

I tried to embed Google AdSense into a side box. But it does not show up. I could sum up from few postings that the adsense advertisements don't show up on the secured pages.

My site has SSL. Is there anyway to assign a Non-Secure SIDE BOX so that the Google adsense advertisements show up ?

23 Jul 2015, 8:33 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #2 by mc12345678

Glad to see you pushing through for your site.

So, regardless of the platform (ZC or a standard webpage) hosting a non-secure sidebox while on a secure page will cause browsers to identify to guests that there is a difference in content. This has a tendency to make vistors wary of the page (and potentially entire site) that such mixed content is presented.

From a commerce perspective, if the only pages that are presented securely are those that ZC respects/expects when SSL is enabled, then one would want to ask why offer a means to allow the purchase process to be derailed? (Why offer something to allow the purchaser to go away from making the purchase?) If all pages are being presented securely, then perhaaps there is something in the code to present the adsense advertisement securely and therefore resolve the problem.

If that option is available from google adsense, then the variable to test against is $request_type. If $request_type == 'SSL' then use the secure adsense code else use the non-secure adsense code.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Jul 2015, 8:36 AM
#3
prabhatm avatar

prabhatm

New Zenner

Join Date:
Jun 2015
Location:
Delhi, India
Posts:
32
Plugin Contributions:
0

Post #3 by prabhatm

Thank you. Commerce is the primary objective. So your argument makes a lot of sense.

24 Jul 2015, 12:12 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #4 by rodg

prabhatM:

My site has SSL. Is there anyway to assign a Non-Secure SIDE BOX so that the Google adsense advertisements show up ?

Short answer is no.

Longer answer is why would you want to. Google supports SSL for all of its content these days, so all you'll need to do is change any http links to the adsense code to use https instead.

mc1-8 has provided the more detailed answer, along with a method so it'll work both with and without SSL enabled browsers.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.