user1409508
user1409508

Reputation: 623

Two Google Analytics on one domain

I have a domain with PHP application. Few days ago I added blog on Wordpress to my domain. www.mydomain.com - PHP Application
www.mydomain.com/blog/ - Wordpress blog

I use Google Tag Manager in my PHP Application and it works fine, but I wanted have different analytic for my PHP app and diffrent for my blog, so I added new website to my analytics account, created new container in Google Tag Manager. I created new tags and rules, added code to php files.
I did everything same as I did in my PHP app, but visitor stats from my blog doesn't work. I don't get any info about visits. I checked in GTM in debug mode and all tags are fired.

Do you have any idea what may be wrong? Why I don't get any info about visits? It's problem with analytics or with GTM?

Upvotes: 0

Views: 95

Answers (1)

CavemanDan
CavemanDan

Reputation: 126

My advice would be to use a single analytics tag across both sections to capture all the data under one account, then Create some 'views' to separate out the Data using filters within each view. It's a much simpler setup will do everything you want.

https://support.google.com/analytics/answer/2649553?hl=en-GB&ref_topic=1009620

Doing it this way you can still use all the rules and macros to perform any additional actions you need (goal tracking etc) and you keep everything under one container which will make your life easier.

If you don't want to do the above, i'd re-check that your Tag Firing rule is correct for the blog version. It should fire when {{URL}} contains /blog/.

If you havent already try using google Tag Assistant chrome plugin to help diagnose any further problems. https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk?hl=en

Upvotes: 1

Related Questions