If this is your first visit, check our documentation. To post, register or login.
Forums / Customization from the Admin / Is there a way to skip analytics on checkout pages?

Is there a way to skip analytics on checkout pages?

Started by allthingsidleroy on 5 Jun 2013, 3:57 PM · Views: 932

Results 1 to 4 of 4
5 Jun 2013, 3:57 PM
#1
allthingsidleroy avatar

allthingsidleroy

New Zenner

Join Date:
May 2013
Posts:
38
Plugin Contributions:
0

Is there a way to skip analytics on checkout pages?

I am trying to put some analytics feeds on my store, but I do not want to track the checkout process (for various reasons). So, I want to put the scripts inside a container and hopefully tell that container to not display during checkout.

Is this functionality already built-in?

5 Jun 2013, 6:58 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Is there a way to skip analytics on checkout pages?

but I do not want to track the checkout process (for various reasons).
So, I want to put the scripts inside a container and hopefully tell that container to not display during checkout
This is contradicting
You either do not want to track the checkout or you do - which one is it??

If using google analytics code - nothing is presented to your customer

Zen-Venom Get Bitten

5 Jun 2013, 7:44 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Is there a way to skip analytics on checkout pages?

If you want to skip analytics on checkout pages, then chances are you also don't care about them on "My Account" or "Login" pages either. So therefore you could simply change your custom analytics code to not display when the PHP variable named $request_type is not set to 'SSL':

if ($request_type != 'SSL') {
 // put analytics code here
}

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Jun 2013, 8:03 PM
#4
allthingsidleroy avatar

allthingsidleroy

New Zenner

Join Date:
May 2013
Posts:
38
Plugin Contributions:
0

Re: Is there a way to skip analytics on checkout pages?

kobra:

This is contradicting
You either do not want to track the checkout or you do - which one is it??

I don't understand the confusion. I originally wanted a container that could be turned off during checkout that held my analytics scripts:

allthingsidLeroy:

I do not want to track the checkout process . . . [can the container] not display during checkout.

DrByte:

if ($request_type != 'SSL') {
// put analytics code here
}


This solution is pretty succinct and easier to manage. Thanks, DrByte.