AdWords
4.1K members online now
4.1K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

How to setup goal for two different domains in Google analytics?

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi All,

 

I want to create goal in google analytics. I have one website which i use for ppc for example: www.abc.com/abc, but when we sign up on that page it goes to other domain for example: www.xyz.com/carts/shopping_cart/showCheckout/57.html

 

So I want to create destination Goal, So how to setup goal in these conditions. Please advise me asap.

 

 

Thanks in Advance

Mandeep Singh

1 Expert replyverified_user

Re: How to setup goal for two different domains in Google analytics?

Top Contributor
# 2
Top Contributor

Hi Mandeep,

 

As far as I understood, this looks to be a case of cross domain tracking, which requires implementing analytics code on both the websites and editing the web analytics code.

 

I would suggest you to read this reference for more insights: https://support.google.com/analytics/answer/1034342?hl=en 

 

Pankaj

Re: How to setup goal for two different domains in Google analytics?

[ Edited ]
Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

Hi Mandeep,

 

To set up goals in such situations you may follow few steps
1. Update analytics code on website to track cross-domains as mentioned by Pankaj (Recommended but not really necessory to track the goals). Because you just need destination url to set the goal.
2. Update GA code on conversion pages on 2nd domain to set the virtual page view
3. Setup goal using page view defined in step 2

 

So -
#1. Optional only to setup a goal as I mentioned before, but you can do it to get proper attribution modelling and some other advantages.
#2. Considering you are using analytics.js version of the GA code, add below GA code on conversion page of "second domain"

<!-- Google Analytics -->
<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-XXXX-Y', 'auto'); // Your domain web property code here
  ga('send', 'pageview', {'page': '/ThankYou'}); // Unique thank you page virtual name

</script>
<!-- End Google Analytics -->
 

#3. Setup goal in analytics with condition <destination url contains /ThankYou>

 

Then you should be able to track the goals. Even you can optionally set up the steps while setting up goal for better funnel visualization.

 

Hope this helps

SJ

Re: How to setup goal for two different domains in Google analytics?

Top Contributor Alumni
# 4
Top Contributor Alumni

Hi Mandeep,

Per Pankaj's post, since you have two domains you'll probably want to do some sort of cross-domain configuration of your Google Analytics Accounts/Tracking Code.

 

Another thing to consider is Event Tracking.  Using Event Tracking in Google Analytics you can tag certain buttons and/or links on your site that lead to the different domain.  For example, if there is a "Buy Now" button on www.abc.com that leads to www.xyz.com, you can tag that button with Event Tracking code and then set that up as a goal inside of Google Analytics.

How to setup goal for two different domains in Google analytics?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi SJ,

Thank for this. We are currently setting up cross domain tracking as our primary domain differs from one where conversions are happening (this one is iframed into our primary domain).

We have done the steps in Pankaj comment and wanted to check with you that domain property code, you are mentioning in your post, should be the one we use for primary domain?

 

ga('create', 'UA-XXXX-Y', 'auto'); // Your domain web property code here
  ga('send', 'pageview', {'page': '/ThankYou'}); // Unique thank you page virtual name

 

Thanks for help,

 

Mariana