Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracking same domains but different environments in Google Analytics

So, say I want to track traffic to different environments, but in the same domain

https://portal.mywebsite.net/

and separately track traffic to

https://production.mywebsite.net/

Sorry if this is a stupid question, but do you do this through filters, or do you have to setup new properties per environment? thanks in advance, I'm a noob to GA.

like image 989
erics15 Avatar asked Jul 17 '14 15:07

erics15


1 Answers

Create two new views one for portal and one for production:

  1. Start with applying a filter to your portal view. Go to View > Filters > Create New Filter
  2. Select Include only & traffic to the hostname, and drop in portal.mywebsite.net.

enter image description here

Rinse and repeat for production.

like image 128
Blexy Avatar answered Oct 21 '22 04:10

Blexy