Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


UltraCart has the ability to automatically inject Google Analytics tracking code into your catalog and checkout screen branding. 

The following tutorial will walk you through configuring your Google Analytics account information within your UltraCart account.

The configuration fields for Google Analytics are found in your Screen Branding configuration area.  This is also the same place for other supported and third party conversion and tracking configuration. 

The following shows you where to add Google tracking for your storefront.


  1. As you can see this section is broken up into 4 sub-sections: Adwords, Affiliate Network, Analytics, and Trusted Stores.
    Simply configure your account information into the desired sections and click Save.

Configuring the GA4 tracking type requires the following credentials:

  1. Tracking Type = GA4
  2. GA4 API Secret
  3. GA4 Measurement ID

Image Removed

Obtaining your GA4 API Secret

  1. First, go to your Google Analytics Admin > Data Streams and open your chosen stream:
    Image Removed
  2. Scroll down to the Additional Settings tab and click on Measurement Protocol API secrets; then click Create:
    Image Removed
    Image Removed
  3. You will have to create a nickname for your new API secret; we recommend naming this GA4-key. Click Create
  4. You will need to copy the Secret value provided into the corresponding UltraCart configuration field. 
    This value is confidential and should only be configured in your UltraCart account.
  5. All done!

Obtaining your GA4 Measurement ID

  1. In Admin, make sure that you have the desired account and property selected.
  2. In thePropertycolumn, clickData Streams, then click your web data stream. Your “G-” Measurement ID appears in the upper right portion of the panel.
    Image Removed

Supported GA4 Events in StoreFront Visual Builder Themes

  • add_payment_info
  • add_shipping_info
  • add_to_cart
  • add_to_wishlist
  • begin_checkout
  • earn_virtual_currency
  • login
  • remove_from_cart
  • search
  • select_promotion
  • signup
  • spend_virtual_currency
  • view_cart
  • view_item
  • view_item_list
  • view_promotion
titlePreparing for Analytics 360 -(Coming March of 2024)

titleObtaining your Google Adwords ID

Tracking Types

There are multiple tracking types supported by UltraCart. The table below describes the various types, the script Google uses, and whether they support asynchronous loading:



(*Replacing all other tracking mechanisms by Oct2023))


Domain Override

By default the system is using in the checkout then the GA tracking is set to use that host. If you have a custom SSL then is passed to the tracking script as This field will provide advanced user the ability to override this on the Google analytics tracking script. 

Cross Domain

If the integration is a checkout only and you do not have a SSL certificate applied to the storefornt checkout, then you'll configure the Cross Domain field with the domain (or domains) associated with the domain of the front end website where the customer will initate the checkout. The domain is entered without the http/https prefixes and without a subdomain.

(enter a comma separated list of domains here. Do not add any spaces.)

Google Tag Manager

Image Removed

To configure Google Tag Manager:

Install a container in your content. Near the top of the window, find your container ID, formatted as "GTM-XXXXXX".
Click your container ID to launch the Install Tag Manager box.
Copy and paste the code snippets into your website as instructed, or download and install the appropriate mobile SDK.
Setup and installation - Tag Manager Help - Google Help


Try using this chrome plugin for testing the google tag manager:

Tracking on External Websites (with Google Tag Manager)

The way Google Analytics loads scripts, it will not replicate the data tags.  To solve this problem we'll use a URL syntax instead of data attributes.  For example if our merchant id is SAMPL, our StoreFront is and our website is, then we connect the two by placing the following tracking script into the Google Tag Manager container for the website:

<script async defer src=""></script>

Just change the mid and channel to match your UltraCart account.

Pricing Tiers

If you have pricing tiers configured on your account for wholesale customers then you can track them on a separate Google Analytics account if you would like. There will be an additional row in the configuration for each pricing tier on your store. If you leave these blank then UltraCart will use the default UA- account when tracking the customer even if they have a pricing tier.

Frequently Asked Questions

Q: I have Google Analytics configured and it's working fine for order placed from the website, but it's not being triggered for my auto orders?

A: The Google Analytic script is fired off based on cookies in the customer browser during the checkout. Since auto orders are generated without the additional involvement from the customer's browser, the GA script is not fired.

The following message from one of our merchants describes an *unofficial* (not directly supported by UltraCart basic support, troubleshooting only available through paid support $100/hr after review by Pro Service department) workaround that they have implemented to triggered the GA script using the XML Postback:


For the latest and greatest code, please visit this github site:

Ryan has made numerous improvements since the initial development which is listed below.


StoreFront.  Please see the following documentation for complete details.