I am trying to create a language specific property in GA4 based off a subdirectory but am not sure how to set this up. In UA, you could apply a subdirectory filter and make a separate view. For example, website www.abc.com/es would be the traffic we want to send to the View for all Spanish traffic.
I tried a lookup table in GTM but I already am using one to populate the measurement IDs for my configuration tag based off hostname, so I can't apply another lookup table to the configuration tag for subdirectory. I cannot create a subproperty either as I do not have GA 360.
Any advice? How are you getting your language subdirectory traffic to send to a separate property?
I am trying to solve the same issue and all I have come to is 2 ways how to set it without ga 360 account :
Create another data stream for this subdirectory, i.e. www.abc.com/es in your case, but I haven't solved yet if there is possibility to choose website url as subdirectory, and if it will work only tracking pages and events along this subdirectory set. Following this also you need to put in main property for ga4 config tag in page view trigger settings like page url doesn't contain /es.
Just set filters in standard and exploration reports inside main GA4 property to exclude/include traffic on /es subdirectory
Related
We are in a situation where we need to restrict whole Tag Manager from loading on certain pages.
Problem is that we don't have anything fixed method to do this.
I ended up thinking that could it be possible to manage a Tag Manager container with Tag Manager?
I could configure it to follow different triggers and administer variables that could hold different values e.g. allowed or disalloed subdomains.
And adding some subdomain restrictions to every single tag is out of the question.
There is a new feature called "Zones" that basically allows you to link GTM containers to the container that is embedded via the snippet. You can load the linked container based on variables (urls, datalayer variable etc). Also for each Zone you can set restrictions as to what types of tags, triggers and variables are allowed (like the blacklisting feature for the tracking code).
The main disadvantage is that every linked container contains the full GTM boilerplate (which add 50kb zipped or thereabouts to your page weight), and that there is a danger that actions in one container have side effects on the other.
But it seems for your use case you could create a default configuration (or even an empty container) that is shared across all your properties and then attach a zone for your respective subdomains.
As pointed out in the comment to the OP this is a 360 feature (360 has a list prices of some 120K p.a. for the lowest tier, so this is rather an enterprise option).
I have a multilanguage site and my plan is to track every language apart.
Example:
domain.com
domain.com/en/
domain.com/de/
domain.com/fr/
For now, I have one GA Property and one GTM Container for the whole site. I was thinking of creating multiple Properties in GA for every language and one for all together. So that would look like this:
domain.com -> GA-1
domain.com/en/ -> GA2
domain.com/de/ -> GA3
domain.com/fr/ -> GA4
Now in GTM I would add to the container one Tag for each Property and create a trigger for each property. GA-1 trigger fires on all pages, GA-2 trigger fires on some page views that page path contains /en/, GA-3 trigger fires on some page views that page path contains /de/...
Is this the best practice and would this work like this? or is there another method to achieve this goal? Or is it enough to create some Views in GA and create some filters for each language?
The goal is to track every language in a different property so the starting point is always the language. Maybe there are also different conversions in the properties.
In this situation, the best practice is to only have a single GA property that tracks the whole site. If you then want to only report on the data from a specific section of your site (i.e. a specific language) then you would use GA views (and filters) to achieve this. You would filter based on the Page dimension (e.g. Page starts with /fr).
There is no benefit to creating a property for each language except maybe to prevent you from going above the 10 million hits per property per month limit of the free version of GA. On the other hand, there is a benefit to tracking the entire site in a single property. The main benefit is that it allows you to perform cross-language analysis.
I would like to add another solution to your question, where you can actually get the result you're asking for (even though it's not best practice).
If you go to Variables > User-Defined Variables -> New
Let's give the variable a name like UA - Tracking ID
You can choose variable type RegEx Table
Set the Input Variable to {{Page Path}}
And set the rows you need to the following:
Pattern
^/en/.*
^/de/.*
^/fr/.*
Output
GA-2
GA-3
GA-4
Under Advanced Settings
Check Ignore Case, and uncheck Full Matches Only and Enable Capture Groups...
Now add this variable {{UA - Tracking ID}} in your Universal Analytics tag under Tracking ID.
This will work on the tracking for each language.
When that's done, I will just add an extra Universal Analytics under Tags that tracks all the pages with the tracking ID GA-1.
Now two tags will be fired on eg. domain.com/en/, one for the combined domain GA-1 and one for the separate domain, in this example GA-2.
I have not been able to find clear answers to the following:
for a client with several country sites (subdomains) I want to use a Google Analytics account per site, plus a roll-up account to collect data of all country sites into one account. I want to use Google Tag Manager to add the analytics to the sites.
To add 2 Universal Analytics tracking IDs in one container for a site, is it needed to change a name somewhere? As you have to do when adding analytics code manually to a site when using an extra roll-up account.
If so, what exactly?
subsequently I want to use autoevent tracking. To track for instance PDF downloads - which are in this case on outbound links. Which is explained in this Justine Cutroni post: http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/
But instead of using the standard macro for url path, I would rather see the url title or the linktext, as the url path is indecipherable in this case (a bunch of numbers and letters).
How can that be achieved? Given that the downloads are from dynamic catalogue pages (and thousands of them).
thanks
Why multiple accounts ? This would just work as well with profiles/views. That could potentially save you a bit of headache (if you have multiple trackers you need to push events etc. to all of them - for multiple view you just need a filter in your view settings).
Having said that, you find the settings for the tracker name under "advanced configuration" in the analytics tag template in the Google Tag Manager (both for ga.js and Universal Analytics). Tick the checkbox with the label "Tracker name" and enter the name (you need to rename at least one the trackers).
I'm using the Google Analytics Flex API to record data from a Flex application.
As I understand it, Google Analytics has a 3-tier hierarchy: An Account can contain one or more Properties, each of which can contain one or more Profiles. A UA code is associated with a Property, and Filters can be used to record specific traffic to a specific Profile.
The application lives on 5 different server environments (development, staging, live, etc) and we need to separate the data from the different environments.
Note that the server environments do not live within the same domain name. For example, staging is at staging.x.com, but the live version is at www.y.com. But I want them all to share the same UA code, so we are tracking them as 5 different Profiles.
So I have one Property with multiple Profiles. I set up a Filter for each Profile saying "Include only traffic form the domains that are equal to" and the particular hostname for that server environment.
The "Default URL" for the Property is set to the hostname of the default Profile, which is the live environment.
We set up that configuration yesterday, and today there is no data in any of our Profiles. We had data the day before (before doing the reconfiguration). I am confident that the tracking code in the client app is sending the hits to GA, since I can see them in Chrome debug mode, and the client app wasn't changed between the day before yesterday and yesterday. The only thing that changed was the configuration of the Property and the Profiles.
So obviously I'm missing something about Property and Profile configuration. Some specific questions:
Am I understanding Filters correctly? Is it somehow applying the Filter to the entire Property? It seemed like the Filters were at the Profile level.
Does the "Default URL" for the Property have an effect on which hits are recorded? What exactly is it used for?
Is there some restriction on how the Profiles within a Property can be affiliated? For example, do they have to belong to the same domain name? I thought not, but maybe I'm wrong?
Any other suggestions?
Obviously, I can experiment with the configuration and see what happens. But I have to wait until the next day to see the effects of each change. Thanks for helping.
Am I understanding Filters correctly? Is it somehow applying the
Filter to the entire Property? It seemed like the Filters were at the
Profile level.
Yes Filters are always applied at the profile level.
Does the "Default URL" for the Property have an effect on which hits
are recorded? What exactly is it used for?
The "Default URL" has no effect on data collection or filtering at all. It's only used to create links from the page reports back to your site. So when you see the top page being /index.html and you click the little link beside it it will take you to "Default URL"/index.html . So you might break that specific feature if the url doesn't exist on you domain. But for the sake of reporting it's completely fine to use a different url.
Is there some restriction on how the Profiles within a Property can be
affiliated? For example, do they have to belong to the same domain
name? I thought not, but maybe I'm wrong?
No, the Profiles inside a Web Property don't need to share the same domain name. It's perfectly fine to have multiple profiles filtered by hostname and it's completely fine and normal to have a global profile with data from multiple hostnames. In that last case the data may be a little off unless you implement Cross Domain Tracking.
Any other suggestions?
It seems that you have a very good understanding of how things work in GA. One thing that you might have missed and #jk commented about is that you should always have an unfiltered profile on you Web Property to avoid losing data due to bad filters.
Another thing to notice is that in the past I had problems with the predefined domain filters. It seems they were being aplied to the wrong field inside Google Analytics. I think they were being applied to the "Visitor ISP Organization". For that reason I never use predefined filters. So if you are using predefined filters you might consider changing them to Custom Include fields, select the "Hostname" metric and enter the domain you want to filter as a RegExp. I believe this bug should be fixed by now, but you never know, I just lost confidence in the predefined filters on that day.
If you acidentaly used 2 include filters in a profile that filter on the hostname but with different values chances are they are canceling each other. So you might want to go into each profile and check if they only contain one include filter each.
eg:
Include only trafic from x.com
Include only trafic from y.com
This will result in a profile with no data.
Another thing to notice is that filters don't apply to retroactive data. So if you apply a filter today to a profile it will only filter data from now on. Data that has already been processed will be elft untouched. There's no way to change data that has been added to a profile, nor to add retroactive data to a new profile.
Other than that you are probably good.
I'm creating a shareable widget, for anyone to copy onto their website. The shareable piece of code is an frame that points to the actual widget that lives on our hosted site (i.e. ourdomain.com). If we ever want to tweak the actual widget, we can do so in one place, with no effect on the iframes pointing to it from other sites we have no control over.
I tried the approach of cross domain tracking. While I was analyzing the results, I observed that the path of the shared widget code (not on our domain) appears within the content view in GA. This runs counter to a response from my previous post "if it is being inserted into many domains you are going to need to set up multiple GA accounts and use different account numbers per user."
Correct me if I am wrong: Any tracking code using our unique account id will appear in our GA by default, no matter where it's hosted, whether the code is implementing cross domain tracking or not.
http://www.google.com/support/forum/p/Google+Analytics/thread?tid=6af5b4c3e30c71be&hl=en
Since any page that hosts GA tracking code shows up in our content view, I could locate where the widget is being viewed by simply looking for all pages whose name did not include ourdomain.com. Of course this includes proxy servers as well, but I was going to also include a custom variable so I could implement a filter based on the custom variable.
So explain to me where this breaks down or what I'm missing here. Is there some amount of data I am losing here because the GA cookie is not in fact being utilized? Give me a good reason why I should put in the effort to fully implement cross domain tracking, including the necessary P3P implementation on our server for IE visitors.
As a sidenote, I am considering adding GA tracking code with an event tracker within the widget itself to track when people actually USE the widget (as distinct from the when the widget is loaded). I understand that by not implementing cross domain tracking I would not be able to obtain any data about the visitor, only whether the widget was acted upon or not.
As the referring site is the primary bit of information we need,
I'm going to pass the referrer in the URL that loads the iframe content
and then overide the referrer within the tracking code
_gaq.push(['_setReferrerOverride',ht_referrer]);
as documented here:
http://www.prusak.com/google-analytics-referrer-override/
This way, I don't need to inject tracking code into my widget, just some JavaScript that adds the referrer to the URL that loads the iframe.
Wish me luck.