Google Analytics: Track visits and events

When you follow the steps below, you will be able to track Google Analytics goals as they are reached in your ion landing pages. If you want visibility in Google Analytics, ion considers goal tracking to be a best practice. As of late October 2009, Google has increased the number of goals available within a single profile to 4 sets of 5.

Setting up goals in Google Analytics

You don't have to set up goals in order to track ion users in Google Analytics, but it sure helps make the reporting you see understandable and actionable. By simply skipping the goals section below and including the Google Analytics tracking code in ion, your ion views will be reported by Google Analytics.


  1. From your Google Analytics homepage, click the 'edit' link within the row of the website profile to which you would like to add goals.
  2. Below your website profile information is the goals section of your profile. Click '+ add goal' to add a goal to whichever goal set you like.
  3. Give your new goal a name. This name should be friendly, logical and the shorter the better. You will see this name in various Google Analytics reports & gauges.
  4. Your new goal will default to 'active'. That's fine, no harm will be done if your goal is immediately active.
  5. Your 'goal position' will default to the first unused slot within the goal set you chose.
  6. As of October 2009, there are three types of goals from which to choose. For the purposes of tracking within your ion console, you'll choose 'URL destination'. Once you make that choice, you will see the 'goal details' section appear.
  7. Set the 'match type' to 'regular expression match' to tell Google Analytics to look for a specific string within a URL. You'll specify what string for it to look for next.
  8. Set the 'goal URL' (which isn't actually a URL in the case of a 'regular expression match') to whatever you would like Google to look for in your URLs. For example, you might want to use 'GA=Lead' as your 'goal URL'. Then, whenever Google Analytics sees a URL that contains 'GA=Lead' it will consider that goal met. Whatever you choose as the 'goal URL' should be unique in that it will not naturally occur in the URLs of your pages (unless you explicitly put it there, which you will learn to do next).
  9. Repeat this process for as many goals as you would like to track. For example, you might want to track separate goals for subscribes, leads and inbounds. If that were the case, you would repeat steps 1-8 above for each goal, making the 'goal names' and 'goal URLs' unique for each one.


Getting your Google Analytics tracking code

  1. From your Google Analytics home page, click the 'edit' link within the row of the website profile to which you would like to add ion tracking data.
  2. Near the top-right of your 'profile settings' page, click the 'check status' link. Below your 'tracking status information' you should see 'instructions for adding tracking'.
  3. On the 'standard' tab, below 'what are you tracking?' you have a choice to make. Choose 'a single domain' if you are pointing a top-level domain name at your ion console (this is unlikely). Choose 'one domain with multiple subdomains' if you are pointing a subdomain (like at your ion console (very likely). Choose multiple top-level domains only if you are using this Google Analytics website profile to aggregate reporting across multiple domain name (like plus (again, this is less likely than the subdomain scenario.)
  4. Once you've made your choice in step 3 (above), copy the resulting code that Google provides.

Using Google Analytics code in your ion Console

ion makes it easy to get Google Analytics tracking code into all of your campaign pages. You simply paste the code you just copied from Google once into your script library and then pull them into the corresponding campaign. Here's how…

  1. From within your ion console, navigate into the Libraries tab and select "Scripts."
  2. Create a new category (if necessary) and then click the green "New script" button to add your script
  3. Give your script a title and paste the code into the available code block
  4. Save
  5. Navigate into the campaign where you would like to add this script, open the Actions dropdown menu and click “Edit campaign.”
  6. Use the available dropdown menus to pull your Google Analytics script into either the closing </head> or closing </body> tag.
  7. Save


Triggering Google Analytics goals in ion

If you set up Google Analytics goals (per the first section of this tutorial), you need to complete the following on any page within ion where you want a goal triggered in Google Analytics.

  1. Navigate to the page you want to trigger the goal in Google Analytics. For example, if you want to trigger your 'GA=Lead' goal whenever a form is submitted, then you would want to add Google Analytics goal tracking to the page that follows the submitted form (i.e. the Thank You page)
  2. Click the page thumbnail to go into the ion page editor.
  3. Click the scripts button from within the Page tab of your creative studio
  4. In the 'query string' field, enter the exact goal URL that you defined in Google Analytics. If your 'goal URL' was set in Google Analytics as 'GA=Lead' then you need to enter 'GA=Lead' in the 'query string' field of the page you want to trigger the goal. You may trigger as many goals as you like on one 'query string' by simply connecting them with ampersands: 'GA=Lead&GA=Inbound'.

Note that ion page URLs are unique for every respondent. This makes it untenable to use Google Analytics as your source of reporting page-related aggregated metrics like page views or time spent on a particular page. It's best to report on goals attained in Google Analytics and use ion's reporting to gain insight into aggregated page metrics.