≡ Menu

How to set up Google Analytics in Netsuite

This article has an update! -> please refer to Installing Google Universal Analytics for NetSuite

For those who don’t know, Netsuite is a hosted, ASP model ERP solution – you can manage your entire site and back-end inventory and accounting with one package, all through your browser. I spend a lot of time with their system, and will be posting on occasion tutorials, reivews, complaints and praise.
Google Analytics is actually Urchin web stats, which Google bought and retooled. They started offering it free in late 2005, and it’s comparable in power and usability to some very expensive packages. I highly recommend it.

  1. First, you must have a Google Analytics account with an available profile – you can find out more here.
  2. Create a custom tag named GOOGLYTICS (or whatever name you prefer). Add to the Footer section under site templates. It really only needs to be someplace on each page, inside the and tags. Your code will look something like this:
    
     
     
  3. For the Checkout and My Account tabs, replace the GOOGLYTICS tag with the following (this is necessary so users don’t get warnings about insecure content on secure pages. You can also just use the secure version for everything.):
    
     
     
  4. Set up order tracking code : There are a number of ways to set this up, and it’s working imperfectly for me at the moment. The goal tracking works, but the revenue fails and I can’t track conversions by keyword or landing page, I think because I can’t add the JavaScript tracking code to the ‘begin checkout’ button where the domain changes from mine to Netsuite’s. Here is the code I made:
    
    

    Note that I was having the form show up in spite of the hidden style, so I added it all to a div named ‘google_tracking’ that I set to display:none; in an external CSS file. I also hand entered some values that Netsuite doesn’t provide dynamically. I tried leaving out the UTM:I line altogether since there’s no way to make it meaningful, but Google didn’t seem to like that.

    Add this code to the ‘Order Confirmation Message’ box under the checkout tab.

  5. Set up the goal tracking in GA
  1. Under analytics settings, click the edit button under settings. Click edit next to G1, the first goal.

    The goal page will be:

    https://checkout.netsuite.com/s.nl?c=######&sc=4&category=thanks

    This time replace the #’s with your Netsuite account number.
  2. Name the goal page whatever you like and set it active.
  3. Funnel navigation (optional): This might not work right for you, but here’s what I did:
  1. Step 1, shopping cart (check the box for required):

    https://yourdomainhere.com/s.nl?sc=3
  2. Step 2, new user/sign in:

    https://checkout.netsuite.com/s.nl?c=######&sc=4
  3. Step 3, enter address:

    https://checkout.netsuite.com/s.nl/c.######/sc.4/category.billing/.f
  4. Step 4, shipping:

    https://checkout.netsuite.com/s.nl?c=######&sc=4&category=shipping
  5. Step 5, payment:

    https://checkout.netsuite.com/s.nl
  6. Step 6, review and submit:

    https://checkout.netsuite.com/s.nl?c=######&sc=4
  • There are a number of problems with setting up the funnel, one being that Netsuite often gives different URLs for the same pages in the checkout process. I know the reporting isn’t right for our checkout, but I’m still tinkering and may find a way to get it right.
  • Set up multiple domains. One of the frustrations that all Netsuite customers have to deal with is losing your domain name in the URL when a customer goes to any secure pages – whether to check out or to access their account settings. Google analytics can be set up to track sessions across multiple domains for just these types of situations, but it requires two things (click for instructions in Google’s words).
    • Add two lines of code to the tracking on every page:

        _udn="none";

        _ulink=1;

    • Add javascript to links pointing to Netsuite.com domains

      This can’t be done as far as I can tell, given the way netsuite works. You would need to change links that would normally look like:

       
      checkout to 
      
       Purchase Now

      First, I don’t like having links that spiders aren’t guaranteed to be able to follow. I would instead recommend using an onclick event for links, like:

      
      Purchase Now
               

      But the big problem is that most people transition from the store domain to Netsuite when they click the ‘begin checkout’ button (which is really a form submission) in the cart page. Unfortuantely there is no way to add the javascript to that button, so there will always be some disconnect in Google Analytics until something changes. I wouldn’t expect the funnel navigation tracking to work right until that problem can be fixed.

      The real problem is that no one wants their customers to have to change domains while on an E-Commerce web site. Unfortunately it’s pretty tough for Netsuite to allow their customers to install their own SSL certs and mirror them across the big array of clustered servers that make up their web front end. I can only hope that the unending clamoring for this feature from their customers will spur them to find a workable solution (then we can move on to other stolen branding problems Netsuite has, like the favicon.ico and the occasional Netsuite-branded 404 page).


  • The following two tabs change content below.
    I have been working with computers and web sites for 20+ years, and have enjoyed mastering many areas of technology. I have been building websites for about 15 years, and working with NetSuite for more than 10. I have worked with dozens of small and medium-sized companies in that time, helping them to understand and leverage the latest tools to grow their business. My business is all about helping you to maximize your business, and I prefer to establish long-term relationships with clients who are dedicated to embracing smart ways to optimize and expand their business.
    5 comments… add one
    • Tom February 20, 2006, 8:18 am

      What do you think of NetSuite NetCommerce Analytics and how does it compare to Google’s tool? Also, I was unsure after I read this, but is this a doable option for a NetSuite Customer?

    • David Norris February 20, 2006, 11:35 am

      Tom,

      I’ve never tried NetCommerce Analytics for a couple of reasons. First, our sales guy told us they couldn’t enable it for our account for a trial without charging us, and it’s also really expensive. I’m not sure what Netsuite’s analytics is capable of, but it would have to be an amazing product to be worth the money.

      It really comes down to what kinds of information you want to track. Google Analytics is great for examining the web site activity that you’d normally expect from a web stats package. It has some nice conversion tracking features that aren’t all working for me, so if you need to track conversions by the keyword you would need something else in addition. Google has a separate conversion tracking system that could be an option.

      I guess the short answer is that I recommend Google Analytics to anyone – it’s free so just try it out and see if it gives you the information you need. If you need to track conversions or Pay Per Click returns, you will probably need another solution.

      -David

    • Barry Steinman February 25, 2006, 10:29 pm

      Netcommerce Analytics lets you see the unique website referrer for each order you receive in Netsuite.

      I would say that is one of the major features.

    Leave a Comment