How do I Add 2 GA4 instances to a website - google-analytics

I have a domain that has several sites sitting underneath it.
ie
My.domain.com/firstsite
My.domain.com/secondsite
My.domain.com/thirdsite
I have created new GA4 properties under a central account for each site. The GA4 is applied to the relevant pages via tag manager and the inbuilt GA4 tag, the trigger was the specific url of the page and everything is currently tracking as expected without issue.
I would like however to add an overriding GA4 account to collect the events for all pages.
Is this as simple as me adding another GA4 property to all pages or is there anything I need to mindful about.
Many thanks in advance for your help.

You dont have to create seperate property for each site. You can add one property(or configuration) to each site.

Related

Can I use Google Tag Manager with the new Google Sites?

I have a new Google sites and already use Google analytics with it but I also would like to use Google Tag Manager. Any one know a way to make that work?
Not really. You could technically add an "Embed" element to the site and add your GTM snippet there. But you can really only trigger tags when the embedded element loads similar to a page view. I believe these elements are similar to iFrames so I don't think you could get any data from the parent URL either.
Otherwise, you can still add Google Analytics by going to "Settings".

Google Tag Manager / Analytics wrong accounts

I created a new TagManager Account.
I added the Code to the head and body space on my website.
I created a Container.
I added a Google Analytics Tag
I created a Variable with exact the UA-XXXXX-1 id for my property.
(I have dozens of different Google Analytics properties in my account.)
Now when I publish the Google Tag Manager changes, the Tag is published and visible. But it publishes a SECOND WRONG property-ID. UA-XXXXX-2.
Yes, the UA-XXXXX-2 is also in MY ACCOUNT. But a complete different Website property!
I have no clue where the TagManager - which is setup completely new - gets the ID from another property. I didn't provide that ID anywhere (the property is archived).
The "Google Tag Assistant" is telling me that I have multiple Tags implemented, but that could not be true.
Error Message: (Multiple Google Analytics tags detected)
How can I solve that?
Affected site "www global-nights com"
This is not a GTM problem. The second account is bundled in a Javascript file (/cdn cgi/apps/head/6sJWcjIvV53_JPO8tyNGb15vJYg.js) included on the top of your page:
So I guess you should be looking into your Cloudflare settings rather than be looking at GTM.

Preventing an iframe on the same domain from triggering a page exit in Google Analytics

I am working on a third party website that contains a web application embedded in an iframe on the home page. This iframe is hosted on the same same sub/domain.
Currently page views are being tracked with _trackPageview. Due to a requirement by marketing both pages use the same Google account Id.
Since the iFrame was implemented the marketing department has noticed that the bounce rate has dropped to almost nothing. I suspect that this is because Google is interpreting the pageView event on the iframe as the visitor hitting another page on the website.
Just for additional information, the domain of the _gaq object is being set to "none" for both the container page and iframe.
Does Google provide a mechanism by which you can trigger PageView in such a way that it isn't interpreted as subsequent pageview in this scenario? (I know that trackEvent has a noninteraction property to deal with this?)
Am I better off just disabling the PageView for the default iframe page?
Does Google provide a mechanism - apparently yes, but probably not for your use case.
The field documentation for Universal Analytics describes the non-interaction field thusly:
Specifies that a hit be considered non-interactive.
So in UA this does no seem limited to events but to apply to all hits (which would include pageviews). I want to point out that I have no tested it and that it seems counterintutive, so it might simply be that the documentation is incomplete/wrong here.
However as you are using "classical" Analytics this does not apply to you. Since upgrading the code is a good idea in any case you might want to push for an update to Universal Analytics (this piqued my curiosity so I will test this over the next few days and update this answer with the results - maybe you want to wait until then, or simply test it yourself).
It's possible, but not 100% clear to me that disabling the PageView event on the iframe will prevent your users from registering a page exit (the pageview may get recorded regardless). You can try removing that event and see if it works.
But a better way may be to implement a custom filter on a new View excluding traffic to that specific class of iframes. Make sure you keep your old View (or create a new one with further filters) to make sure you're capturing those iframe views, if you think that's necessary.

Google analytics page tracking

I have a question about google analytics page tracking. I have a website and the main domain is www.tdconnect.nl. Now I want the following. All pages hanging under tdconnect.nl/cisco/. Should get a separate Google Analytics. What is the best way to do this?
Thank you!
Using a default GA tag would do the job unless you specifically want to completely independently track the cisco subdirectory. in which case 2 separate tags are required, and you should check outthe following https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#singleSubDirectory
From what I understand, you want to show data under tdconnect.nl/cisco/ in a separate GA account.
You may choose to create a new filter against your directory.
(Recommended).
You may create a different GA Account altogether and
then change the property ID on the new section.
You may choose to create a new sub-domain cisco.tdconnect.nl

Tracking conversions from another property

I have one website and 2 blogs. Everything is working for years and till recently we were ok with setup.
I am promoting one of the blog pages on Twitter,Facebook,LinkedIn. I can see conversions on main property but I cant tell how many conversions were from each of the sources. I just can see blog page as a source. When i switch to blog property in GA i can see segmented traffic by sources but ofc no conversions (goals are defined only on the main site)
I am reading for tracking goals from multiple properties but it only confuses me more and more. Is this possible to pass data from one property to another and be able to see what I want to see (segmentation by sources and conversions) ?
I am new to Google Analytics, and when I walked through the setup process, there was a lot of explanation about Social settings. I suspect this is new. Google has put in fields for you to track traffic to your blogs that comes in from your other social presence(s).
You'll want to identify your profile URLs for Twitter, LinkedIn and Facebook so that it can break it down for you correctly.
They state:
If you leave the Web Property Prefix blank, you'll see Activities data for the domain you are tracking with Google Analytics (e.g. example.com). If you also wish to see Activities data for properties such as your YouTube channel, enter your prefixes here; for example, youtube.com/example. Make your prefix as specific as possible (i.e. do not simply enter youtube.com). Activities data is only shown for properties from which your domain has received hits.
Source: Google Analytics Social Settings: Web Property Prefix Help

Resources