Google Analytics code?

Hey guys I was wondering where exactly do you place your “Google Analytics Code”?



Thanks in advance.

Where ever you feel like mate,



I’ve placed mine in bottom.tpl so that it loads after the page loaded

Thanks cool, may I ask exactly where in bottom.tpl please, sorry I’m not really too good with coding.

Just under the last closing table ()

I’ve made <-SNIP-> to make the code easier to read,

Essentially just paste the code at the bottom of the page

```php {* $Id: bottom.tpl 2521 2006-11-10 06:59:12Z seva $ *}











{include file="affiliate/affiliate_code.tpl"}

[B]<-SNIP->[/B]



[COLOR=Red]
[/COLOR] ```

Wow, thankyou very much.



Did I place it in the right spot



```php {* $Id: bottom.tpl 2474 2006-11-05 11:39:30Z zeke $ *}

























{** Bottom navigation **}



{** /Bottom navigation **}
{** Copyright **}



{** /Copyright **}

{$lang.home}
|
{foreach from=$top_links item="link"}
{$link.descr} |
{/foreach}
{$lang.sitemap}

{$lang.copyright} © {$settings.Company.company_start_year} {$settings.Company.company_name}. All Rights Reserved.


{include file="affiliate/affiliate_code.tpl"}


[B]
[/B]


```

Sorry bud but no,



you need to remove the additional tags


```php [COLOR=#000000][COLOR=#007700]

[[/COLOR][COLOR=#0000bb]b[/COLOR][COLOR=#007700]]<[/COLOR][COLOR=#0000bb]script src[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#dd0000]“http://www.google-analytics.com/urchin.js” [/COLOR][COLOR=#0000bb]type[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#dd0000]“text/javascript”[/COLOR][COLOR=#007700]>

[/COLOR][COLOR=#0000bb]

[/COLOR][/b]

[/COLOR] ```[COLOR=#000000]
Notice that my one doesn't have '[B]' / '[/B]' OR '[/COLOR][COLOR=#000000]

' in my coding, simply remove those tags and it should be fine .
FYI edit your post and remove the "UA-1234-3" from the code and place '00's into it, it a small security precaution.
[/COLOR]```php

[COLOR=Black]
[/COLOR]
```

Cool thank you very much,



and for telling me about removing my analytics number, thanks. Oh also could you edit the post above this one too also take out my analytics code please, thankyou.



So this is how its supposed to be:



```php {* $Id: bottom.tpl 2474 2006-11-05 11:39:30Z zeke $ *}

























{** Bottom navigation **}



{** /Bottom navigation **}
{** Copyright **}



{** /Copyright **}

{$lang.home}
|
{foreach from=$top_links item="link"}
{$link.descr} |
{/foreach}
{$lang.sitemap}

{$lang.copyright} © {$settings.Company.company_start_year} {$settings.Company.company_name}. All Rights Reserved.


{include file="affiliate/affiliate_code.tpl"}




```

Thats it bro.

All done

Thanks alot man :slight_smile:

If you use secure server… CHECK THIS THREAD !



[URL=“http://vb.cs-cart.com/showthread.php?t=2537&highlight=secure”]http://vb.cs-cart.com/showthread.php?t=2537&highlight=secure[/URL]

[quote name=‘SWS’]If you use secure server… CHECK THIS THREAD !



http://v

b.cs-cart.com/showthread.php?t=2537&highlight=secure[/QUOTE]





Hey thank you very much, I took that code you had on that page and just added my own google analytics code number, is that all I had to do?



Thanks.

Should be,

be sure that you have a SSL certificate to go with it otherwise you’ll start giving firefox users a run for their money

Its not working in Internet explorer, it popsup asking me if I want to show all the secure and non secure so I press yes, than the ssl goes away and the page isn’t secure anymore.



Please what to do?



I do have ssl installed on my server.

[quote name=‘ibodybuild’]Its not working in Internet explorer, it popsup asking me if I want to show all the secure and non secure so I press yes, than the ssl goes away and the page isn’t secure anymore.



Please what to do?



I do have ssl installed on my server.[/quote]



Can you confirm that you’re using the HTTP[COLOR=Red]S [COLOR=Black]version of the analytics code?[/COLOR][/COLOR]

Well I’m not really sure, but I’ll give you my bottom.tpl code:



You can see in the attached pic the problem I get when going to “register” on my site.



```php {* $Id: bottom.tpl 2474 2006-11-05 11:39:30Z zeke $ *}

























{** Bottom navigation **}



{** /Bottom navigation **}
{** Copyright **}




{** /Copyright **}


{$lang.home}
|
{foreach from=$top_links item="link"}
{$link.descr} |
{/foreach}
{$lang.sitemap}

{$lang.copyright} © {$settings.Company.company_start_year} {$settings.Company.company_name}. All Rights Reserved.



DISCLAIMER: This information on this site is intended for general reference purposes only and is not intended
to address specific medical or health conditions. This information is not a substitute for professional medical advice or
a medical exam. Prior to taking nutritional supplements or participating in any diet or exercise program or activity, you
should seek the advice of your physician or other qualified health professional. No health information on this site should
be used to diagnose, treat, cure or prevent any medical condition.



{include file="affiliate/affiliate_code.tpl"}


{if $current_location = $https_location}


{else}


{/if}


```

I know I have ssl and it has worked before, but now it seems not to be working, my site is [url]http://tinyurl.com/32t4pl[/url] .

Thankyou very much for the helping me.

[B]EDIT: If you go to my site with Internet Explorer and go to "register", it asks you if you want to show the secure and non-secure stuff on the page and when you press yes, it won't allow you to go and the blank browser page comes up, PLEASE WHAT DO I DO IN THIS CASE, BECAUSE THIS IS A BIG PROBLEM.[/B]

problem.jpg

[quote name=‘ibodybuild’]Well I’m not really sure, but I’ll give you my bottom.tpl code:



You can see in the attached pic the problem I get when going to “register” on my site.



```php {* $Id: bottom.tpl 2474 2006-11-05 11:39:30Z zeke $ *}

























{** Bottom navigation **}



{** /Bottom navigation **}
{** Copyright **}




{** /Copyright **}


{$lang.home}
|
{foreach from=$top_links item="link"}
{$link.descr} |
{/foreach}
{$lang.sitemap}

{$lang.copyright} © {$settings.Company.company_start_year} {$settings.Company.company_name}. All Rights Reserved.



DISCLAIMER: This information on this site is intended for general reference purposes only and is not intended
to address specific medical or health conditions. This information is not a substitute for professional medical advice or
a medical exam. Prior to taking nutritional supplements or participating in any diet or exercise program or activity, you
should seek the advice of your physician or other qualified health professional. No health information on this site should
be used to diagnose, treat, cure or prevent any medical condition.



{include file="affiliate/affiliate_code.tpl"}


{if $current_location = $https_location}


{else}


{/if}


```

I know I have ssl and it has worked before, but now it seems not to be working, my site is [URL="http://tinyurl.com/32t4pl"]http://tinyurl.com/32t4pl[/URL] .

Thankyou very much for the helping me.

[B]EDIT: If you go to my site with Internet Explorer and go to "register", it asks you if you want to show the secure and non-secure stuff on the page and when you press yes, it won't allow you to go and the blank browser page comes up, PLEASE WHAT DO I DO IN THIS CASE, BECAUSE THIS IS A BIG PROBLEM.[/B][/quote]

One of your problems is with this image loading from http and not https :

[URL="http://www.supplements123.com/skins/aquarelle_red/customer/images/supps123.jpg"]http://www.supplements123.com/skins/aquarelle_red/customer/images/supps123.jpg[/URL]

This is the reason you get the secure items warning from what I can see looking at your code. Dont use a full path, use a relative path to the image instead like : [U][COLOR=#296dc5]skins/aquarelle_red/customer/images/supps123.jpg[/COLOR][/U]
[U][COLOR=#296dc5][/COLOR][/U]
[U][COLOR=#296dc5]Sorry, I forgot to add, this is looking at the code on your website not in the message above ![/COLOR][/U]

Hey SWS, you seem to be the answer-man on this topic - thanks so much for all the help I’ve already gleaned from your many threads on SEO issues - heh - I’ve got a couple ?'s for ya.



Is there a way to make the ecommerce tracking only happen with certain transaction methods/outcomes? Like only when it’s “processed”? We’ve got in-house sales guys who use the cart to whip up estimates (which basically just creates an “open” sale in the cart). Most sit there and never get processed. But Google Analytics is tracking them as actual sales. I want it to only track the processed credit card sales.



My first thought was just to filter out our company’s IP address in Analytics settings, but that didn’t seem to work - it’s still logging the transactions



Second, is there a way to utilize the “funnel”?



Any thoughts would be greatly appreciated! Thanks!

It will be possible to filter by order status yes, order status is passed through the cart, such as F - failed - O -open etc, so it should only require an if statement to be present



to be honest I had a hard enough job getting it to track atall so Ive not really played with the funnelling.



The problem is not the code, its the waiting time to see if the tiny change has made any difference



Each edit, just to see if it worked you have to wait upto 24 hours…



BTW : Credits for this mod shouldnt goto me, the inital code was created by somebody else on the forums.

UPDATE: If you look at my post above, I successfully worked out both issues.



In order to get Google to track only processed transactions, all I had to do (on order_details.tpl) was change the first IF at the bottom from



from

{if $smarty.get.confirmation == 'Y'}



to

{if $smarty.get.confirmation == 'Y' && $order_info.status == 'P'}



Thanks for that suggestion SWS. I’m by no means a PHP genius, but knew enough to figure that out.



Also, Google’s funnel works great once you put in the right info. Just go into your Analytics Settings>Profile Settings>Goal Settings (the same place you entered the checkout goal), and below that you’ll see the section called “Define Funnel”. Here’s what I used:



^/index.php?target=cart (Cart Main Page)

^/index.php?target=checkout&mode=customer_info (Customer Info Page)

^/index.php?target=checkout&mode=checkout (Order Details Page)

^/index.php?target=checkout&mode=summary (CC Info Collection Page)



All these settings are working great for us - Analytics keeps track of how far they got in the checkout process, with nifty little arrows and such - the boss loves it. :wink:

I am not sure what I have done wrong but some weeks before when I read all threads here and installed analytics code for my site. It worked fine and suddenly I may have done something wrong which screwed up everything and now I can not get my site working. Whenever I do “Checkout” it warns me with “this site has secure and non-secure page…display …yes…no…cancel…”. If I click yes/no, cancel whatever it is it dumps with error and can not take customers to checkout page.



Here is what I have in my bottom.tpl



After the last tag I have placed following code:



{if $current_location == $https_location}





{else}




{/if}

Where XXXXXXX-X is replaced with my Analytics Tracker Number.

In my admin panel I also have checkout and login enabled for secured page. I have my own SSL installed on my domain. My site url is: [url]www.banglaclick.com[/url]

I will really appreciate if anyone can give me a hand in this. I am just feeling fustrated as my visitors dropped from 800 visitors per day to 20 visitors per day now.

Please help help help !