Integrating your Ontraport account with Google Analytics is a great way to collect and analyze purchase activity data from your ecommerce site. Once set up, you’ll gain valuable insights about your products and services, average order value, the length of your sales cycle, and more.


Google Analytics Ecommerce Tracking is available to users with Ontraport Plus accounts and above.

Steps


  • To enable Ecommerce Tracking in your Google Analytics account, follow the steps in this article. Copy and save your Google Analytics ID number. You will need this in step 7.
  • Configure Google Analytics for your currency.
  • In your Ontraport account, go to Contacts > Forms.
  • Choose an existing or create a new Ontraport order form to connect with Google Analytics. Add an Order Form block to your form, click on it, then click the form settings button  on the lefthand block menu. A pop-up will appear.
  • Scroll down to Advanced, then click the checkbox “Send Google Ecommerce Tracking parameters to landing/thank you page.” Click the orange save button.
    1. Every form submission after making this change will send Google’s ecommerce tracking parameters to the thank you page. You won’t have to re-embed the form on your webpage.
  • Get the Ontraport sample script from GitHub by copying the “minified version” to a text file.
  • Add your Google Analytics ID number (from step 1) and your currency code to the sample script.
    1. Locate googleAnalyticsId = “UA-123456789-1” and replace the numbers inside the quotes with your own.
    2. Locate googleAnalyticsCurrency = “USD” and replace “USD” with your own currency code if it’s different.
  • In Ontraport, go to the Pages tab. Find and click into the thank you page that corresponds with your order form.
  • Click the settings button then scroll down to the Custom Code section. Copy and paste your edited Ontraport sample script into the Custom Header Code box. Click the blue save button.
  • Wait 24 hours for the data to populate into Google Analytics, then test the script.