Analytics
3.7K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

tracking code two top-level domains same site

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

My Google Analytics account currently tracks our website, http://www.mauitradewinds.com.  It has now become useful to track our domain's associated secure website,  https://secure.mauitradewinds.com   I would like to combine the data from both these domains into a single report.  I've seen the article at https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#introduction   but I'm unclear how to implement it.  We have migrated to Universal Analytics. 
Our tracking code references ga.js which is hosted locally.  Here is the ga.js code...

(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-10865704-2', 'mauitradewinds.com');
  ga('send', 'pageview');

Re: tracking code two top-level domains same site

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭
The code posted in my initial question was truncated. I'll try again...
(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-10865704-2', 'mauitradewinds.com');
ga('send', 'pageview');