2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Google Analytics

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

If I have my website with http and https, which generated 2 different tracking ID, do I have to add the script for both (as shown below) in all my pages or only one is enough?

I don't really care to track http and https differently.  I saw help references that showed how to setup preference for www and non-www.  


(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'UA-XXXX1621-1', 'auto');
ga('send', 'pageview');

ga('create', 'UA-XXXX1621-2', 'auto');
ga('send', 'pageview');




Re: Google Analytics

Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Two trackers are not required.

Just make sure all the pages have the tracking code.

Best Regards,

'Star' or 'Accept as Solution' if it helped.

Re: Google Analytics

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thank you for responding.
I had different tracker ID for http and https, so was asking if I had to put both. The code is already added to all the pages.

On second thought I am guessing, the differentiation is only when I have to view the analytics from google account and need to select the web property (http or https) which matches the IDI have used in the code. If this is the case, I think I am good.