Analytics is an important tool used today for gathering data across various marketing channels to help consolidate information and metrics into an easily accessible view to acquire a greater scope on orders and visitors.
What is a tracking script?
Tracking scripts are very useful and extremely common in the world of ecommerce.
You can use external tracking scripts for extensive tracking capabilities such as entire site visitor tracking scripts, order tracking scripts that track conversions/visits.
These are the places that the scripts will need to placed, based on what type of script is necessary.
- General Tracking Script - Header : Settings > Marketing
- Order Specific Tracking Scripts - Order Specific Placement : Settings > Orders > Place Order Script
- General Tracking Script - Footer : Themes > Active Theme > Footer
1. Header Placement For General Tracking Scripts
You can place them in the "Analytics Script" section of Settings > Marketing > General > Miscellaneous
2. Order Specific Tracking Scripts - Order Settings
You can place order specific tracking scripts under Settings > Orders > General scroll to the Miscellaneous area and place the script with the Place Order Script script area:
The script will be added to the bottom of the ViewOrder page.
The script can reference order based merge codes to populate order information.
- 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.
3. Footer Placement For General Tracking Scripts
You can place general tracking scripts in the footer under Themes > [Active Theme] > Footer.
1. From your active menu navigate to Themes > [Active Themes]
Note: You can identify your active theme by locating the theme in the "Active on Current Store" section
2. On the left theme navigation menu click on the Footer link
3. Click on the Widgets link on the Footer menu
4. Drag a Custom HTML widget from the Available Widgets area to the footer widgets area on the right.
5. Click the Wrench Edit icon on your newly created Custom HTML widget.
6. Click the "Switch To The Text Only Editor" link in lower right hand of WYSIWYG editor
7. Paste your Script into the text editor
8. Click Save
More Information On Analytics Tracking