Menu
Feedback
Start here
Tutorials


Tutorials
Integration with monitoring tools
Setting up the sales funnel on Google Analytics
3 min read

Google Analytics goals are meant to help you evaluate whether your site's goals are being met. This article will show you how to set up a conversion goal, known as Sales Funnel, in stores that use VTEX SmartCheckout. To learn more about goals, visit the conversion topic in Google Analytics Help.

With the sales funnel configured, you can track and analyze the customer's steps until the completion of an order. To set up the sales funnel, let's take into account that the purchase process starts on your product screen and goes through the shopping cart, checkout (personal data, shipping, payment) and reaches the goal, which is the order placed page.

To make it easier, the entire setup in this article can be imported directly into Google Analytics with this template.

For manual configuration or editing of an existing goal, the first step is to access Analytics and click on the Administrator button in the lower left corner. Then go to the Goals option, from the "View" column.

{"base64":"  ","img":{"width":1780,"height":842,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":131304,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/projects-and-integrations/integration-with-monitoring-tools/setting-up-the-sales-funnel-on-google-analytics_1.png"}}

In the goal administration screen, choose to create a new goal or to edit an existing one.

In step 1 you can follow with a custom type goal:

{"base64":"  ","img":{"width":736,"height":401,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":39467,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/projects-and-integrations/integration-with-monitoring-tools/setting-up-the-sales-funnel-on-google-analytics_2.png"}}

In step 2 you can define the name you prefer for your goal and a position code (for internal Google Analytics use). In type, let's use "Destination":

{"base64":"  ","img":{"width":738,"height":586,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":54630,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/projects-and-integrations/integration-with-monitoring-tools/setting-up-the-sales-funnel-on-google-analytics_3.png"}}

In step 3 we have the most sensitive settings. In it we set the page that determines the completion of the goal and the path the clients will take to reach it.

In the "Destination" field select the regular expression option and enter the URL of the order placed page: ^/checkout/orderPlaced

{"base64":"  ","img":{"width":718,"height":121,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":18301,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/projects-and-integrations/integration-with-monitoring-tools/setting-up-the-sales-funnel-on-google-analytics_4.png"}}

Then configure the path that the client will go through until an order is finished. In such case, we're taking into account that the purchase process starts on the product screen; then my funnel will serve to measure the number of customers who access this screen, how many orders have been finished and at which step customers are giving up the purchase.

Still in step 3, enable the Funnel option with the following steps:

  1. Product = /p($|\?) (not required)
  2. Cart = ^/checkout/(\?.*)?(#/cart)$
  3. Identification = ^/checkout/(\?.*)?#/email$
  4. Personal data = ^/checkout/(\?.*)?#/profile$
  5. Delivery = ^/checkout/(\?.*)?#/shipping$
  6. Payment = ^/checkout/(\?.*)?#/payment$

{"base64":"  ","img":{"width":737,"height":428,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":57280,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/projects-and-integrations/integration-with-monitoring-tools/setting-up-the-sales-funnel-on-google-analytics_5.png"}}

One way to verify that the goal is set correctly is to use the "Check this goal" link. Google will generate a goal conversion simulation within the last 7 days.

Now just save the goal and wait for the time the system needs to start counting the data. Usually it takes 24 hours.

To view your funnel, see the Analytics reports and go to the Conversions menu and then to the Goals option.

If you have a multi-language store with languages as subdirectories of the gTLD you should replace every carret (^) with a regex that matches the different subdirectories. For instance, if your website is available in:

  • **Italian: **example.com/it
  • **Spanish: **example.com/es
  • **French: **example.com/fr
You would have to change your destination:
  • **From: **^/checkout/orderPlaced
  • **To: **^/(it|es|fr)/checkout/orderPlaced
This needs to be done for every funnel step as well.

The funnel settings in this article have been updated to follow the new version of SmartCheckout shared cart. For comparison purposes, see below the old settings:

  1. Product: /p($|\?) (not required)
  2. Cart: ^/checkout/(#/cart)?$
  3. Identification: ^/checkout/#/email
  4. Personal Data: ^/checkout/#/profile
  5. Delivery: ^/checkout/#/shipping
  6. Payment: ^/checkout/#/payment

Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Setting up Google Adwords
« Previous
Sharing your store access to Google Webmaster Tools
Next »
Contributors
1
Photo of the contributor
+ 1 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX Community
Join our community
Request VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback