SOP 021: Setting up Conversion Goals in Google Analytics

Setting up Conversion Goals in Google Analytics

Last Updated / Reviewed: Aug 24th, 2022

Execution Time: 10-30 minutes

Goal: To have all your website conversions being tracked and reported in Google Analytics.

Ideal Outcome: Your Google Analytics set up has all your Goals configured and being correctly reported.

Prerequisites or requirements: If you don’t have Google Tag Manager running on your site yet,x you can follow the steps described in SOP004. You also need to have Google Analytics on your website, if you don’t have it yet, you can follow the steps described in SOP009 (or SOP 067 if you’re using Shopify).

Where this is done: In Google Tag Manager and Google Analytics

When this is done: When you want to track a new Goal.

Who does this: The person responsible for website management, or analytics.


SOP Update: Google Analytics 4

If you’re using a Google Analytics 4 property then follow this SOP instead:

Set up and track custom events in Google Analytics 4.

If you’re still using Universal analytics then follow the steps below to get started:

Deciding which conversion tracking method is better for you

This SOP covers 2 methods of setting up your Goals: using Google Tag Manager, and not using Google Tag Manager.

In some cases, you can use one method or the other depending on your personal preferences or the way you are setting up your tools. If you are unsure about which method is more appropriate for you, you can follow this diagram:

TV7M0kLIVZHKYm2HFezUy\_ek0cX-bj7vIKpmBmkaBUTTG5uxBpNxV8DvjiOeo\_iM8WzpURS9FjeZ0bhFRMHIcwNUY3JLcv-r45B6389cTvIlEljLqwPWYtg7LMe\_HcsQO9ufAYeGXV7pMuJfM5Y8oSEUu2Wuk8d5oeHLqADVKW7AUpxbVcZ0rNm6pkDJ

There are a few cases where you might have found a solution that is more appropriate for you but does not correspond to the one you got by following the diagram. If that is the case, bear in mind your solution might be absolutely fine.

Using Google Tag Manager when setting up Google Analytics Goals

Using Google Tag Manager to track Google Analytics conversion goals involves two major steps:

  1. Setting up Google Analytics Events using Google Tag Manager
  2. Configuring your Events as Goals in Google Analytics

Setting up Google Analytics Events using Google Tag Manager

  1. Go to tagmanager.google.com and select the account you want to work on:
  2. In the sidebar, click on ‘Tags’ 🡪 ‘New’:
  3. Rename your tag:‌
    [Abbreviated Name Of Tool][Use for this tag] is a good start._e.g: “GA_Event_LeadSignup_Trial”, “GA_Event_AddtoCart”, “GA_Event_5MinutesOnSite”, “GA_Event_5PagesSession”.

4. Under “Tag Configuration” click “Choose a tag type to begin set-up”. From the dropdown list select “Universal Analytics”.

5. On the “Google Analytics Settings” dropdown, select your Google Analytics ID variable:

You can identify your Universal Analytics property by noticing the ‘UA-’ prefix in the Property ID.

6. On the “Track Type” dropdown, select “Event”:

7. You will now be prompted to enter the information that you would like to send to Google Analytics about this Event:

  • Category: Depending on your business and how you structure your account you might want to group it by UI Elements for instance (if that is the case this could be “Video”.) For this example, naming categories after customer journey stages was the chosen option.
  • Action: This is the second drill down level, you might want to name it after the action that the visitor performed on your website. (e.g.: If your category is “Video” you can choose “Download”, “Watch”, etc.)
  • Label: This is the last drill down level. You might want to enter specific information about the action that was performed. (e.g.: If your action is “Download” you can have here the name of the file)
  • Value: This value can be monetary or not and will be associated with the event you are setting up.
  • Non-interaction hit: When the user performs the required action to trigger this event, do you want this user to be counted as a non-bounce? If yes, leave it as “False”.
    • Note: If you’re not sure, ask yourself the question:
      • “Does performing this action mean that this page is relevant to the user?”
        • If yes: Set it up as “False”.
          • (e.g., playing a video)
        • If not: Set it up as “True”.
          • (e.g., closing a popup)

8. You will now need to select under which conditions you would want this Event to fire:

a. Page View: If you have a “Thank You” page to where the user is redirected to after the conversion, or if your Goal is triggered when the user visits a specific page on your website (e.g.: Pricing Page) you can select 'Setting up a “Page View” Event'

b. Click: If you want to set up the Goal when a click on a specific element occurs you can select 'Setting up a “Click” Event'

Setting up a “Page View” Event

  1. Scroll down to ‘Triggering,’ click the interlocking circles icon above ‘Choose a trigger to make this tag fire…’, then click the ‘+’ icon to add a new trigger:
  2. Rename your Trigger 🡪 Click icon above ‘Choose a trigger to begin setup’ 🡪 Select ‘Page View’ 🡪 Select ‘Some Page Views’:GA_ThankYou_FriendReferral” since this trigger is going to be used to track a conversion, using a thank you page for referring a friend to get a $20 coupon.
  3. Under the trigger firing rules, select: ‘Page URL’ 🡪 ‘matches RegEx’.
  4. You will now need to build a RegEx (Regular Expression) that matches the URL where we want our Goal to fire.
    a. It starts with http, or https;
    b. You are using a trailing slash, or not;
    c. You are adding parameters to your URL, or not;
    d. You have deeper URLs in your folder structure, or not;
  5. Type the URL where you want your conversion to fire. _e.g.: _http://www.retroaddicts.com/thank-you-new-subscriber/
  6. Remove the http:// (or https://), the www, and the last trailing slash from the URL:\e.g.: \retroaddicts.com/thank-you-new-subscriber
  7. Add a __\ _right before every dot and every slash._e.g.: retroaddicts.com/thank-you-new-subscriber
  8. Add this code after your URL: (?!/./)((/?)$|.*.*=.)_e.g.: _retroaddicts.com/thank-you-new-subscriber(?!/./)((/?)$|.*.*=.)
  9. Add this code in the beginning of your URL: (http|https)://(www.)?_e.g.: _(http|https)://(www.)?retroaddicts.com/thank-you-new-subscriber(?!/./)((/?)$|.*.*=.)
  10. That’s it. You just built your RegEx. Take note of that expression.
  11. Insert your RegEx in the last field. It should look something like this:
  12. Click the blue ‘Save’ button at the topmost right side of your screen:
  13. Click the other ‘Save’ button in the Tag configuration panel.
  14. The next steps correspond to setting up a ‘Click’ event. Go to Step 10 in “Setting up a “Click” Event“ to continue to the next step for the ‘Page View’ SOP.

Setting up a “Click” Event

  1. Back in your Tag Manager workspace, click ‘Variables’ 🡪 ‘Configure’.
  2. A list of variables will be available to you. Select all the variables under ‘Clicks’ and when that is done close the list.
  3. Click ‘Triggers’ 🡪 ‘New’:
  4. Rename your Trigger → Click icon above ‘Choose a trigger to begin set-up...’ → Select ‘Click: All Elements’ → Select ‘All Clicks’ → ‘Save’:
  5. You now need to find out which of the variables to use for the purpose of what you want to track. To do that, open a new tab in the Google Tag Manager Overview, click “Preview” on the top right of the page:
  6. Enter the URL of your website → Click ‘Start’.
  7. This will open your website’s URL on a new tab. Navigate to the page where the button you want to track is. You should be able to see a message on the bottom right corner letting you know that the debugger has connected successfully.
  8. On your keyboard hold down the “Ctrl” (or “Cmd ⌘” key If you’re using a Mac) and click on the button that you want to track. Google Tag Assistant (Google Tag Assistant) will list all your actions:
  9. In this list, Google Tag Manager lists all the information that was returned from that click.
    a. If your “Click ID” field has been filled with a text string (e.g.: 'link_text-6-20') take note of the combination. (e.g.: Click ID | link_text-6-20).
    b. Scroll down and on the ‘Triggering’ section → Click the icon above ‘Choose a trigger to make this tag fire…’ → Select the trigger you have just created in ‘step 4 in Setting up a Click Event’.
  10. Click the blue “Save” button on the topmost right corner, and that’s it. You’ve just created your trigger and added it to your tag, this event will now fire according to the conditions you have just set and send the values you configured.
  11. Now, you are now ready to hit ‘Submit’ all the changes you’ve made.
  12. In the Submission Configuration panel, you will be given the chance to add a name and description to this version. After you have done so, hit “Publish”.
  13. You will now be taken to see the summary of the changes you’ve just made:

Configuring your Events as Goals in Google Analytics

  1. Open your Google Analytics account settings by clicking here or clicking the (âš™) gear icon in the sidebar.
  2. Select the correct Google Analytics Account, Property, and View.
  3. Click “Goals”:
  4. Click “New Goal”:
  5. Scroll down and select ‘Custom’:
  6. Input the name and select your preferred Goal ID and Goal Set slot (If you don’t have any Goal yet leave the default option). Select “Event”, and click “Continue”:
  7. Enter the same values for the “Category”, “Action”, and “Label” that you chose before when creating the tag, make sure all drop downs are set to “Equal to". Leave “Value” blank.
  8. Click “Save”. You should now see the Goal you have just created, make sure the “Recording” toggle is set to “On”.

Setting up Google Analytics Goals directly in your Google Analytics Account

  1. Open your Google Analytics account settings by clicking here or clicking the (âš™) gear icon in the sidebar.
  2. Select the correct Google Analytics Account, Property, and View.

You can identify your Universal Analytics property by noticing the ‘UA-’ prefix in the Property ID.

  1. Click “Goals”:
  2. Click “New Goal”:
  3. Input the name and select your preferred Goal ID and Goal Set slot (If you don’t have any Goal yet leave the default option). ’:
  4. Click the goal you would like to track:
    1. Destination: If you have a “Thank You” page for your conversion, you can select this Goal: “Creating a Destination Goal'.
    2. Duration: If your Goal is defined by how long the user session lasts, you should select this Goal: “Creating a Duration Goal'
    3. Pages/Screens per session: If your Goal is defined by how many pages the user has viewed on your website, you should select the goal: 'Tracking a Pages per Session Goal'
  5. Select the option that better fits what you want to track:

Creating a Destination Goal

  1. Select “Destination” and click “Continue”

Enter the settings for this Goal:

  1. Destination:
    1. Equals to: If your “Thank You” page URL does not use parameters (e.g: /thank-you/?name=John) you can select this option.
      1. E.g: [Equals to] /thank-you/
    2. Begins with: If your “Thank You” page URL contains parameters and does not contain a subpath (e.g: /thank-you**/upsell/**?name=John), you can select this option.
      1. E.g: [Begins with] /thank-you/
    3. Regular expression: If your case does not fit any of the above cases, you can either select this option and contact a developer, or use the steps already described in 'Setting up a “Page View” Event' above using Google Tag Manager.
  2. Value: This field is optional but recommended. If you are able to estimate how much this conversion is worth to you, you should enter it here.
  3. Funnel: Leave the toggle in the “Off” position, unless you are already familiar with this option and want to set it up now.
  4. Click “Save” and you should now be able to see the Goal you have just implemented, make sure “Recording” toggle is “On”:

Creating a Duration Goal

  1. Select ‘Duration’ and click ‘Continue’.
  2. Enter the settings for this Goal:
  3. Duration: The session time after which you would want the Goal to be considered complete.
  4. Value: This field is optional but recommended. If you are able to estimate how much this conversion is worth to you, you should enter it here.
  5. Click “Save” and you should now be able to see the Goal you have just implemented, make sure “Recording” toggle is “On”:

Tracking a Pages per Session Goal

  • Select ‘Pages/Screens per Session’ and click ‘Continue’.
  • Enter the settings for this Goal:
  1. Pages/Screens per session: The number of pages the user has to view after which you consider the Goal as complete.
  2. Value: This field is optional but recommended. If you are able to estimate how much this conversion is worth to you, you should enter it here.
  3. Click “Save” and you should now be able to see the Goal you have just implemented, make sure “Recording” toggle is “On”:

Testing your Google Analytics Goals

  1. Open your website using Chrome.
  2. Click on the Google Tag Assistant (Legacy) Chrome extension and click “Record.”
  3. Perform the required action to trigger your conversion.e.g.: Open your “Thank You” page, ‘Submit’ your form, click your add-to-cart button, etc.
  4. Click again on the Google Tag Assistant Chrome extension and click “Stop Recording” and then click “Show Full Report”:
  5. Select “Google Analytics Report”:
  6. Select the view that you want to test and click “Ok”: Scroll down in the report until you find the “Conversions” section, you should be able to see the name of your Goal, your Conversion Value, and a green tick after it.
  7. Make sure your Goal is not firing when you don’t want it to by clicking the Google Tag Assistant extension again, and then clicking “Record” and performing an unrelated non-conversion action:
  8. Once again, click “Stop Recording” → Click “Show Full Report” → Navigate to “Google Analytics Report” on the top → Select the view you want to test → Scroll down to “Conversions”. You should not have any conversion showing up this time.

Was this article helpful?