Knowledgebase: General

Can I Add Tracking and Conversion Scripts?

 

Yes.

Shift4Shop allows you to add custom scripts to your website; these could be Javascript functions to be used in the HTML, Tracking Scripts from third party services like Bing,  StatCounter, and Conversion Scripts from affiliate programs like Share-a-Sale and Commission Junction to track sales.

Please Note
The following information is being provided solely as a courtesy to you to advise how tracking and conversions scripts may be added to your store.

Please understand that assisting with the adding of 3rd party scripts is not something that Shift4Shop support will be able to assist with since it falls outside of our scope of support.

If you would like specific assistance with adding 3rd party tracking and/or conversion scripting to your site, we have the service available to Shift4Shop Merchants. Please click here for more details.

Tracking Codes

Tracking codes are usually required to be added to most or every page of your site. Any code entered in the Global Header, Global Footer, Global Left or Right Banner sections will usually be automatically displayed on every page of your store. Keep in mind however, that some of these banners could be disabled in the website depending on your specific layout or on certain pages.  For example, you may have configured a layout that omits the right banner.  Typically, for scripts that are needed on every single page, the Global Footer works best since it appears in all pages.

To add a tracking code to your store:

  1. Login to your Store Manager
  2. Using the left hand navigation, go to Content >Header and Footer
  3. Add the script to the Global Footer field with the WYSIWYG mode turned off.

Note
Tracking codes can usually also be added to the Global Header or the Global Left/Right Banner if you have one. Just be sure to "Enable" the section after your tracking code(s) are added.

  1. Click the "Save" button at the top right of the page to commit your changes.

Conversion Codes

Conversion codes are used to report your conversion goals or sales to third party services like Affiliate Programs. Rather than having them listed on every page (as with tracking codes) the best place to have the conversion code is on the cart's final checkout page.

To add a conversion code:

  1. Log into your Store Manager
  2. Go to Content >Titles & Content
  3. Look for "Checkout #4" and click its "Actions >Edit" button located to the far right of the page listing

Additional Information:
Checkout 4 is also known as the order's "Thank You for your Purchase" page. Regardless of whether you are using single or multi-page checkout, your completed orders will eventually hit Checkout 4. This is why we advise placing the conversion tracking on this specific page.

  1. Add the script to the Footer section.

Note
If the code requires the Invoice Number or the Order amount you can use the variables [invoice-prefix][invoice-number] for the Invoice number, [ototal] for the Order Total, or [osubtotal] for the Subtotal of the order (before shipping and taxes).

  1. Click on "Save Changes"

Special Note
Some products that use conversion codes will also require that your order totals be free of currency symbols and formatting.

The following Dynamic Tag variables can be used for these situations.

  • [total]
    total without currency symbol
  • [ordersubtotal]
    subtotal without currency symbol
  • [total_noformat]
    total without currency symbol. Also no commas for totals over $999
    (i.e. 1,000; removes the comma)

Other types of Scripts

3rd party scripts aren't just limited to tracking and commission situations. Some 3rd party services can also fall into the realm of security seals, product recommendations services, even simple marketing services.

Either way, as long as the scripting provided is javascript or provided via simple HTML; it can usually be easily added to your store using the store's Global Footer or Left/Right Banners for the placement of the script to show across the entire site, or otherwise in the Titles & Content area for individual pages as needed.

Note
If you are using Google Analytics, please refer to our Google Analytics article for more complete information about adding their tracking codes.


Help Desk Software by Kayako fusion