Netsuite SuiteCommerce Advanced > Blog  > How to Setup Google Analytics in SuiteCommerce Advanced
sca feat img

How to Setup Google Analytics in SuiteCommerce Advanced

Setting up your new SuiteCommerce Advanced web store is only part of the equation. The other half is understanding your customers’ behavior, what they are buying, which items or sections of your store they interact most, and when do they choose to leave your website. That’s where analytics tools like Google Analytics come in.

Although SuiteCommerce Advanced has always offered built-in support for Google Universal Analytics, Google Analytics integration support has improved considerably throughout the various releases of SuiteCommerce Advanced.

Here’s a quick guide on how to integrate Google Analytics in your SuiteCommerce Advanced web store.

Note

This guide assumes that you have already have signed-up for a Google Analytics account. If you haven’t done that, please refer to Analytics help for information.

Before we begin, be sure to have your Google Analytics tracking ID readily available. In case you don’t know, it’s a tracking code with the following format – UA-XXXXXX-X

There are 3 different ways Google Analytics can be integrated into SuiteCommerce Advanced web stores. Each of those depends on which version of SuiteCommerce Advanced you’re using and also on whether you have Google Tag Manager installed or not.

Google Analytics Integration in SuiteCommerce Advanced Denali & Mont-Blanc versions

In the Denali and Mont-Blanc versions, the Google Analytics tracking ID is placed in the SuiteCommerce Advanced configuration files. Since SuiteCommerce Advanced provide separate configuration files for

Shopping, Checkout and My Account, NetSuite allows you to configure the Google Analytics accounts for all three of them. To do that just following the steps below.

  1. Create a custom module that includes the SC.Shopping.Configuration, SC.MyAccount.Configuration, or SC.Checkout.Configuration object as a dependency.
  1. Extend the googleUniversalAnalytics object to set the propertyID, value, and domainName (as shown below)

googleUniversalAnalytics: {
propertyID:
,   domainName: ”
}

  1. For the propertyID, enter the Tracking ID for the property in your Google Analytics account.

To locate this tracking ID, login to your Google Analytics account and go to Admin > Property > Property Settings.

  1. For the domainName enter one of the following, depending on the custom module you are configuring:
  • ShoppingApplication – enter the domain name of your site.
  • CheckoutApplication and MyAccountApplication – This is normally checkout.netsuite.com or checkoutna1.netsuite.com. Just check to see which checkout domain your site uses on the Setup subtab of the Web Site Setup record. Here, the CheckoutURL field will have the checkout domain listed.
  • If you have your own SSL certificate running under a subdomain, just use that as the value for the domain name.

The resultant code should be similar to the following:

     tracking: {
googleUniversalAnalytics: {
propertyID: ‘UA-xxxxxxxx-x’
,   domainName: ‘mynetsuitesite.com’
}

  1. Optionally, you can also enable additional tracking.

By default, the trackPageview function is used. In addition to tracking page views you can enable the tracking of specific events for e.g. contact form fills. To enable event tracking, please refer to SuiteCommerce Advanced’s tracking module.

Google Analytics Integration in SuiteCommerce Advanced Vinson and Elbrus

Starting with Vinson, NetSuite allowed users to configure Google Analytics directly through the NetSuite ERP’s user interface. If you’re using SuiteCommerce Advanced Vinson or Elbrus, just follow the procedure below.

  1. Go to Setup > SuiteCommerce Advanced > Configuration.
  2. Navigate to the Integrations tab and then to the subtab for Google Universal Analytics.
  3. Enter the required values here like the Google Universal Analytics Tracking ID, domain and the secure domain in this subtab.
  4. Save the Configuration record

That’s it. Hope you find this post useful. Have a SuiteCommerce Advanced development requirement you would like to discuss? Let’s Talk.

No Comments

Leave a reply