About AmeriCommerce
 Getting Started and Initial Setup
 Site Design and Layout
  Catalog and Product Management
 General Topics
 Images and Product Photos
 Content Management
 Email Management
 External Carting
 Marketing Management
 Microstores and Multiple Storefronts
 Order Management
 Payments Setup and Management
 Reporting and Analytics
 Security Management
 Shipping
  Other Software and Services
 AmeriCommerce API
 AmeriSync for Quickbooks
  Other Help and Docs
 Screenshots
 Training Videos
 Release History
 Glossary of Terms
Question / Issue - KB ID # 258

External Tracking Scripts: Where can external tracking scripts be placed?


Answer / Solution
Last Update : 2009/07/17
Rating : Not Rated
Send FAQ by E-mail
Add to favorites
Print this FAQ

Social Bookmark this Article :

You can use external tracking scripts for extensive tracking capabilities such as entire site visitor tracking scripts, order tracking scripts that track conversions/visits. Below are some guidelines on where you can place your scripts:

Where to put General Tracking Scripts:

You can place general tracking scripts in the footer under Themes > [Active Theme] > Page Footer.

Where to put Order Specific Tracking scripts:

You can place order specific tracking scripts under Store > Store Settings - scroll to the area 'Integration Settings' and place the script with the script tags in this area:

Order Tracking Script

The script will be added to the bottom of the ViewOrder page. 

Note:

  • This script will only be inserted and run one time per order and will be right when the order is initially placed.
  • The script will not be shown when a credit card is declined.

The primary purpose of this area is for use with external scripts that you may need to run only one time per successful order. An example being the customer survey run through Shopzilla which needs to be run only once per order and not everytime a customer views their order.  Though additional information for the customer could be included here, it may not be an ideal location and the location cannot be changed.

Where to place Google Analytics Conversion Tracking Scripts:

Google Analytics tracking scripts need to be placed in the footer under Themes > [Active Theme] > Page Footer

The following script can be added to the footer. This works on releases of 5.0.24 and later with a merge code for conversion tracking inserted into the existing page tracking code:

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try{

var pageTracker = _gat._getTracker("UA-xxxxxx-x");

##GOOGLECONVERSIONTRACKING##

pageTracker._trackPageview();

} catch(err) {}

</script>

Note: this only works with dedicated SSL, not shared SSL

Related FAQs
Where should I install the Javascript code for Google Analytics?

Direct Link to This FAQ
https://www.americommerce.com/kb/?f=258

Tags
google analytics, conversion tracking, tracking, reporting, google reporting, google conversion tracking

How would you rate this article?

Poor
1
2
3
4
5

Great
Submit

Back to Top