Setting up Sales Funnel across websites in Google Analytics

In this article, you will learn to set up Sales funnel in Google Analytics, when some of the funnel pages (including the order confirmation page) are hosted on another website.

This is quite common in case of affiliate websites and third party shopping carts, where the final part of the checkout process occurs on a different website):

cross domain tracking set up

The Sales funnel in Google Analytics

Following is the sales funnel, we are going to set up in Google Analytics, by using virtual pageviews and by setting up cross domain tracking between our website and the website which host the shopping cart:

funnel1

funnel2

funnel3

This sales funnel is made up of following funnel pages:

#1 Product detail pages – a product detail page shows all of the information about a product. Let us assume, that all of these pages are hosted on your website.

#2 Shopping Cart page – this page list all of the products in a shopping cart. Let us assume that this page is also hosted on your website.

#3 Contact information page – this page asks for customers email and shipping address and provide an option to enter discount code. Let us assume that this funnel page is on the different website which host the shopping cart.

#4 Shipping page – this page allows a website user, to select a shipping method. This funnel page is on the website which host the shopping cart.

#5 Payment page – on this page the user enter his credit card details and provide billing address (if it is different from the shipping address). This page also provide an option to enter discount code. This funnel page is on the website which host the shopping cart.

#6 Place an order page – This is an order confirmation page which is shown to a user once he has complete a purchase. This funnel page is on the website which host the shopping cart.

All of these pages together, make up my sales funnel.

I am now going to set up this sales funnel in Google Analytics by following the steps below:

Step-1: Map your entire sales funnel.

Step-2: Set up cross domain tracking between your website and the website which host the shopping cart.

Step-3: Configure the website which host the shopping cart to generate and send virtual pageviews.

Step-4: Set up sales funnel in Google Analytics and test it.

Get the E-book (52 Pages)

Get the E-Book (37 Pages)

#1 Map your entire sales funnel

Determine all of the web pages which make up your shopping cart. In my case, the sales funnel is made up of following pages:

#1 Product detail pages – https://www.mywebsite.com/collections/products/

#2 Shopping Cart page – https://www.mywebsite.com/cart

#3 Contact information page – https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=contact_information

#4 Shipping page – https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=shipping_method

#5 Payment page – https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=payment_method

#6 Place an order page – https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93/thank_you

#2 Set up cross domain tracking

By default, Google Analytics does not share cookie information (client ID) with another website.

Because of this reason, by default, you can’t track website user’s journey which span multiple domains.

In order to track user’s journey across domains, follow the steps below:

Step-1Allow your website (i.e. source domain) to pass cookie information (client ID) to the website which host the shopping cart (i.e. destination domain).

In order to accomplish this goal, add following line of code in the Google Analytics Tracking Code of your website:

ga(‘create’, ‘UA-12343-26’, ‘auto’,{‘allowLinker’: true }); // allow source domain to pass cookie information

Now your Google Analytics tracking code, may look like the one below:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-12343-26', 'auto',{'allowLinker': true });
  ga('send', 'pageview');

</script>

Step-2: Set up AutoLink plugin for your website.

This plugin is used to track cross domain traffic in Google Analytics. Add following line of code in the Google Analytics Tracking Code of your website:

ga(‘require’, ‘linker’); // setup autoLink plugin

Now your Google Analytics tracking code, may look like the one below:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-12343-26', 'auto',{'allowLinker': true });
  ga('require', 'linker');
  ga('send', 'pageview');

</script>

Step-3: Define the domain that need to be automatically cross linked

You can define the domain that need to be automatically cross linked by using the linker:autoLink’ Command.

Let us suppose the address of the website which host your shopping cart is anotherWebsite.com.

So here is how the linker:autoLink command can be used in that case:

ga(‘linker:autoLink’, [‘anotherWebsite.com’]); // Auto link to anotherWebsite.com

Add this line of code to the Google Analytics tracking code of the website.

Now your Google Analytics tracking code, may look like the one below:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-12343-26', 'auto',{'allowLinker': true });
  ga('require', 'linker');
  ga('linker:autoLink', ['anotherWebsite.com']);
  ga('send', 'pageview');

</script>

Step-4: Allow the website which host the shopping cart (i.e. destination domain) to accept cookie information (client ID) from your website (i.e. source domain).

In order to accomplish this goal, add following line of code in the Google Analytics Tracking Code of the website which host your shopping cart:

ga(‘create’, ‘UA-196844-17’, ‘auto’,{‘allowLinker’: true }); // allow destination domain to accept cookie information

Now the Google Analytics tracking code of the destination domain, may look like the one below:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-196844-17', 'auto',{'allowLinker': true });
  ga('send', 'pageview');

</script>

Step-5: Set up AutoLink plugin for the destination website. Add following line of code in the Google Analytics Tracking Code of the destination domain:

ga(‘require’, ‘linker’); // setup autoLink plugin

Now the Google Analytics tracking code of the destination domain, may look like the one below:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-196844-17', 'auto',{'allowLinker': true });
  ga('require', 'linker');
  ga('send', 'pageview');

</script>

Step-6: Define the domain that need to be automatically cross linked – Let us suppose the address of your website is mywebsite.com. So here is how the linker:autoLink command can be used in that case:

ga(‘linker:autoLink’, [‘mywebsite.com’]); // Auto link to mywebsite.com

Add this line of code to the Google Analytics tracking code of the destination domain.

Now the Google Analytics tracking code of the destination domain, may look like the one below:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-196844-17', 'auto',{'allowLinker': true });
  ga('require', 'linker');
  ga('linker:autoLink', ['mywebsite.com']);
  ga('send', 'pageview');

</script>

As you can see, setting up cross domain tracking is not that hard. The problem really occurs, when you can’t change the Google Analytics tracking code of the destination domain, which host your shopping cart.

In that case, you can ask the developer/webmaster of the destination domain, to add following line of code (highlighted in bold) to his Google Analytics tracking code:

<script>
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-196844-17’, ‘auto’,{‘allowLinker’: true });
ga(‘require’, ‘linker’);
ga(‘linker:autoLink’, [‘mywebsite.com’]);
ga(‘send’, ‘pageview’);

</script>

Note: replace mywebsite.com by your domain name.

Once this task is complete, the cross domain tracking is set up between your website and the website which host the shopping cart.

If the developer/webmaster of the destination domain, refuse to add the cross domain tracking code to his GA tracking code, then there is nothing much you can do, except change your shopping cart provider.

If you are using a popular shopping cart like Shopify, then you don’t need to ask them, to add the cross domain tracking code to their GA tracking code.

As soon as you enable the Google Analytics tracking in your shopify account, cross domain tracking will be automatically set up.

So when a user leave your website and move to the shopping cart (hosted by Shopify) to complete the checkout, the cross domain tracking is already there to track user’s activities between your website and the third party shopping cart.

To learn more about cross domain tracking, read the article: Cross Domain Tracking in Universal Analytics – demystified

#3 Configure destination domain to send virtual pageviews

You now need to configure the destination domain, so that it sends virtual pageviews for each funnel page.

For example, if a user visit the Contact information page (hosted on the destination domain), you can add the following code to the destination domain:

ga(‘send’, ‘pageview’, ‘/checkout/contact_information‘);

Here , ‘/checkout/contact_information’ is a virtual pageview which is generated and sent, whenever your website users, visited the ‘Contact information’ page hosted on the destination domain.

Configuring destination domain to send virtual pageviews, varies from domain to domain. The actual implementation depends upon the CMS and shopping cart being used by the destination domain.

So I can’t share a code, which you can use and configure your destination domain to send virtual pageviews.

If you are using a shopping cart like Shopify, you don’t need to configure the shopify website to send virtual pageviews to your GA property. You just need to identify the virtual pageviews, which Shopify generates for each funnel step.

To identify such virtual pageviews, follow the steps below:

Step-1: Navigate to the first funnel page, hosted on Shopify via Google chrome browser. In my case, the first funnel page hosted on Shopify, is the Contact information page (https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=contact_information)

Step-2: Right click on the web page and select ‘Inspect‘. This will open the ‘Google Developer Console

Step-3: Click on the ‘console’ tab and then search for the virtual pageview generated by the page:

shopify virtual pageview

The virtual pageview generated by the ‘contact information’ page is ‘/checkout/contact_information

Step-4: Use step 1 to 3, to determine the virtual pageview generated by each funnel page hosted on the destination domain. In my case, following would be the various virtual pageviews:

#1 Virtual pageview generated by Contact information page (https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=contact_information) – /checkout/contact_information

#2 Virtual pageview generated by Shipping page (https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=shipping_method) – /checkout/shipping

#3 Virtual pageview generated by Payment page (https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93?step=payment_method) – /checkout/payment

#4 Virtual pageview generated by Place an order page (https://checkout.shopify.com/3108721/checkouts/d7ba5d79341cdb6755266b811ed15d93/thank_you) – /checkout/thank_you

#4 Set up Sales Funnel in Google Analytics

Once you have documented the virtual pageviews for each funnel page, you can now set up the sales funnel in Google Analytics.

Follow the steps below:

Step-1: Create a new goal of type destination in your GA view.

Step-2: Configure the funnel steps as shown below:

final funnel1

final funnel2

Step-3: Carry out 2 or 3 test transactions, on your website and then check your funnel visualization report after couple of hours. If you see data for each funnel step, then your sales funnel is working.

Note: You can not use events as funnel pages in Google Analytics.

Similarly, you can also use virtual pageviews and cross domain tracking, to set up Goal funnel which spans across websites.

Other Articles on Specialised Tracking in Google Analytics

  1. Google Analytics Recurring Revenue and Subscriptions Tracking Guide
  2. How to track the impact of cookie consent on website traffic in Google Analytics
  3. Phone Call Tracking in Google Analytics and Beyond
  4. Scroll Tracking via Scroll Depth Trigger in Google Tag Manager
  5. Video Tracking via YouTube Video Trigger In Google Tag Manager
  6. Calculated Metrics in Google Analytics – Complete Guide
  7. The one thing that you don’t know about PayPal.com and the referral exclusion list
  8. Introduction to Postbacks in Google Analytics
  9. Creating Content Group in Google Analytics via tracking code using gtag.js
  10. Tracking Site Search without Query Parameter in Google Tag Manager
  11. Setting Up Site Search Tracking for POST based search engines in Google Analytics
  12. Tracking Site Search for GET-Based Search Engines in Google Analytics
  13. Understanding site search tracking in Google Analytics
  14. Tracking Virtual Pageviews in Google Tag Manager – Complete Guide
  15. Creating and using Site Search Funnel in Google Analytics
  16. Learn to Setup Facebook Pixel Tracking via Google Tag Manager
  17. How to use Keyword Hero to reveal Not Provided keywords in Google Analytics
  18. Guide to Event Tracking via Google Tag Manager
  19. Learn to track Qualified and Won leads in Google Analytics
  20. Creating your own Google Analytics Tag Auditing System
  21. Using multiple Google Analytics tracking codes on web pages
  22. Guide to Offline Conversion Tracking in Google Analytics
  23. Google Analytics and YouTube Integration Guide
  24. Complete Guide to Google Analytics for Facebook
  25. Tracking true referrals in Google Analytics when using PayPal and other payment gateways
  26. Virtual pageviews in Google Analytics – Complete Guide
  27. YouTube Video tracking via Google Tag Manager
  28. Implementing E-Commerce Tracking via Google Tag Manager
  29. Event Tracking in Google Analytics – Complete Guide
  30. E-Commerce Tracking in Google Analytics – Complete Guide
  31. Google Analytics Cross Domain Tracking Explained Like Never Before
  32. Google Analytics Social Tracking – Twitter, Facebook, Google Plus and LinkedIn
  33. Setting up & Tracking AMP Pages in Google Analytics
  34. Setting up Sales Funnel across websites in Google Analytics
  35. Using Data Visualization to analyze the SEO Performance
  36. Tracking offline conversions in Google Adwords
  37. How to Correctly Measure Conversion Date & Time in Google Analytics
  38. Tracking Twitter and Linkedin Social Interactions in Google Analytics
  39. Implementing Scroll Tracking via Google Tag Manager
  40. Phone Call Tracking and ROI calculations – Champion’s Guide
  41. Google Analytics Cross Domain Tracking (ga.js)
  42. Open Graph Protocol for Facebook Explained with Examples
  43. How to Exclude URL Query Parameters in Google Analytics?
  44. Understanding Google Analytics Default Page Setting
  45. Implementing rollup reporting in Google Analytics
 

Do you know the difference between Digital Analytics and Google Analytics?


99.99% of course creators themselves don’t know the difference between Digital analytics, Google Analytics (GA) and Google Tag Manager (GTM).

So they are teaching GA and GTM in the name of teaching Digital analytics.

They just copy each other. Monkey see, monkey do.

But Digital analytics is not about GA, GTM.

It is about analyzing and interpreting data, setting up goals, strategies and KPIs.

It’s about creating strategic roadmap for your business.


Digital Analytics is the core skill. Google Analytics is just a tool used to implement ‘Digital Analytics’.

You can also implement ‘Digital analytics’ via other tools like ‘adobe analytics’, ‘kissmetrics’ etc.

Using Google Analytics without the good understanding of ‘Digital analytics’ is like driving around in a car, in a big city without understanding the traffic rules and road signs.

You are either likely to end up somewhere other than your destination or you get involved in an accident.


You learn data analysis and interpretation from Digital analytics and not from Google Analytics.

The direction in which your analysis will move, will determine the direction in which your marketing campaigns and eventually your company will move to get the highest possible return on investment.

You get that direction from ‘Digital analytics’ and not from ‘Google Analytics’.


You learn to set up KPIs, strategies and measurement framework for your business from ‘Digital analytics’ and not from ‘Google Analytics’.

So if you are taking a course only on 'Google Analytics’, you are learning to use one of the tools of ‘Digital analytics’. You are not learning the ‘Digital analytics’ itself.

Since any person can learn to use Google Analytics in couple of weeks, you do no get any competitive advantage in the marketplace just by knowing GA.

You need to know lot more than GA in order to work in digital analytics and marketing field.


So what I have done, if you are interested, is I have put together a completely free training that will teach you exactly how I have been able to leverage digital analytics to generate floods of news sales and customers and how you can literally copy what I have done to get similar results.

Here what You'll Learn On This FREE Web Class!


1) The number 1 reason why most marketers and business owners are not able to scale their advertising and maximise sales.

2) Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

3) The number 1 reason why conversion optimization is not working for your business.

4) How to advertise on any marketing platform for FREE with an unlimited budget.

5) How to learn and master digital analytics in record time.

 
 

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

Himanshu Sharma

Digital Marketing Consultant and Founder of Optimizesmart.com

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence.

The Digital Analytics Association is a world renowned not-for-profit association which helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!