AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.8K members online now
1.8K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
Guide Me

Setting up a destination goal for a website with a different URL.

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Is it possible to set up a destination goal for websites with a different URLs. I am trying to track how many people view my homepage and then click on my ordering website, but the two websites have to totally different URLs.  

1 Expert replyverified_user

Re: Setting up a destination goal for a website with a different URL.

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi Freestyle M :-)

You can use events to track clicks on the outbound links,

To do this.. add the following code to the link itself (entering your url details etc to replace the example code)


<a href="" onclick="trackOutboundLink(''); return false;">Check out</a>

and then add the following code before the closing </body> tag on the same page


* Function that tracks a click on an outbound link in Google Analytics.
* This function takes a valid URL string as an argument, and uses that URL string
* as the event label. Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
var trackOutboundLink = function(url) {
   ga('send', 'event', 'outbound', 'click', url, {
     'transport': 'beacon',
     'hitCallback': function(){document.location = url;}


If you have further questions or need further help, pls post back :-)



Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here