1

I have multiple domains that use the same files (from git master branch). Now, I want to implement google analytics on each domain.

I've tried this vue-anlaytics package multiple domain tracking (see link - https://medium.com/dailyjs/tips-tricks-for-vue-analytics-87a9d2838915#7ead) but the problem is whenever I try to visit domain1.com. It also registers on the domain2.com google analytics dashboard.

Please help.

japhfortin
  • 361
  • 4
  • 6
  • 18
  • How do you have GA implemented currently? The link you sent is for tracking on multiple properties. So it is doing what it is supposed to do. I would like to know about how you have GA coded so we can come to a solution together. – XTOTHEL Apr 22 '19 at 15:18
  • Hi, you're right. And I misunderstood how it was supposed to do. My bad though. I ended up defining the ga_id as an environment variable on each domain and injected the ga_id from there. Cheers! – japhfortin Apr 22 '19 at 21:46

1 Answers1

0

Defining the tracking code or GA_ID to an environment variable on each instance helped me solve the issue.

japhfortin
  • 361
  • 4
  • 6
  • 18