I've set up Google Analytics account with two properties:
www.example.com
buy.example.com
Now I've created a custom dimension to be used as unique user ID (I am using cookie to assign unique ID to each website visitor)
Does it possible to generate report for my custom dimension cross domain? (so I can see ID data from www.example.com and buy.example.com in the same repot?)
when I've two properties can I set a goal between them?
Thanks
Shai
You need to only have one web property that you use on both sub-domains (www and buy).
Put the same tracking code on each.
You can then create two views, with a filter for www and buy sub-domains if you want to see them separately.
Your unique visitor counts etc. will all be cross sub-domain as you desire, and you can set Goals etc. according.
Related
My domain: hospital.org/app
2 Type of user:
- Patient
- Admin
Example URL for Patient: hospital.org/app/fp/main/PA_MedicationsProgress.php
Example URL for Admin: hospital.org/app/fa/main/Admin_Dashboard.php
Currently, I am tracking data for both Patient & Admin but I need to separate the data for 2 types of users here. The URL for the patient will contain "PA" and the URL for the admin will contain "Admin".
My current solution:
Example URL for Patient: hospital.org/app/fp/main/PA/MedicationsProgress.php
Example URL for Admin: hospital.org/app/fa/main/Admin/Dashboard.php
But this will require me to change the URL and set up different properties which are not integrated into 1 report. Is there any way for me to show the data differently for these two users without changes these?
You can filter or use a segment in the same Property based the currently URL: /fp/ or /fa/ without modify the page name.
We have been registering user ids, and when we go to Audience->User Explorer, the users are all there, each with their activity measures. But we can't find a way to filter some users out of our custom reports.
We do ga('set', 'userId', 'xxxx-xxxx'); but we didn't create any custom dimension. We just told GA specific user-IDs for each.
We haven't been able to set up a segment, as we can't find the id in the filter. Neither in report filter.
We could go the the user and delete all their data. But that is not our point, and we need to keep this data as well. Ideally we would segment our users, but we can't use this filter in the segment definition.
If you want to segment user by userID, you need to create a custom dimension of which you can access. The clientId is not accessible as a dimension to segment on.
Is it possible to segment based on URL path?
Say I have one Google Analytics account with one created property (tied to abc.com). Depending on your login information, it will send you to abc.com/red, abc.com/blue or abc.com/yellow.
Is it possible to create separate views for /red, /blue and /yellow? How do you implement a custom filter for it?
Using Google Data Studio, how would you add a filter control to filter between /red, /blue and /yellow?
In your GA filter for the view choose :
predefined -> include only traffic to the subdirectories -> that are equal to -> /red/
I'm looking for some general advice. The site I'm currently working on is full of duplicate content that's about to be deduplicated. But it was built that way to track different audiences visiting the pages by reporting on the URL hits.
Current Links
www.MySite.com/homeowner/painting
www.MySite.com/professional/painting
www.MySite.com/designer/painting
My concern is that at the end of the day, the person managing the analytics wants to be able to look at their report and say "We had X number of professionals visit the site." Simply deduping will elimate that.
I'm thinking Google Analytics might have a way to pass audience/tags in via the URL like this:
Example Links with Tracking
www.MySite.com/painting?tag=homeowner
www.MySite.com/painting?tag=professional
www.MySite.com/painting?tag=designer
Is this possible with Google Analytics? Does anyone have an example website using this?
I've looked into Custom Dimensions and Metrics but they seem to be overkill https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets
Custom Dimensions are not overkill, it's a reasonable idea for you to use them (because segmentation is what they are for, really).
Using a url tag has a couple of disadvantages. For one The tagged pages will appear as three distinct rows in your reports - you will be unable to get an aggregated number for www.MySite.com/painting, instead you will have three Urls (or as many as you have parameters).
Secondly, homeowner etc. are attributes that belong to a session, or even a user (if the role cannot change from visit to visit). However if you track them via url parameters they have only a hit level scope, i.e. they are recorded as a property of the viewed page, not the viewing visitor. If you record this as a session scoped variabe you need to set it only at the first pageview, and the value will be applied to all subsequent pageviews for that session.
So an easy way (example assumes you are using php) might be to use
if(isset($_GET['tag']) {
ga('send', 'pageview', {
'dimension1': "<?php echo filter_input(INPUT_GET, 'tag', FILTER_SANITIZE_ENCODED); ?>"
});
} else {
ga('send', 'pageview');
}
in your tracking code after you have created a session scoped custom dimension in your property settings ("dimension1" referring to the first custom dimension in your account, the numeric index changes for each dimension. The dimension name is only used in the reports, not the tracking code). You need to be careful not to send an empty value when the query string is not present - a session scoped custom dimension only records the last value from a session, if you send empty values you overwrite the value you recorded at the first pageview.
Alternatively you can do this without changing the tracking code at all - create a custom advanced filter to capture the value from the query string, a second to copy the value to your custom dimension and a third to remove the query string from the url. However while that's a neat trick using code is much easier.
I have two domains, a .nl and a .be domain. Both have their own Google Analytics IDs. Currently I have the analytic code on the website and, depending on the domain, the correct ID is inserted into the code. The tracking works correctly on both sites.
Now I want to implement the Google Tag Manager, to get more flexibility for Javascript.
The struggle is now how get to the same result, without implementing the Google Tag Manager twice (or more if more domains are added).
How can I achieve this? I tried with the rules in combination with a regex on the {{url}}, but without any success.
The best way if you want to prepare for more domains would be a lookup table macro.
First create a url type macro that return the hostname. Then create a macro of the type lookup table - that is a macro that returns a value based on the value of another macro. It should look something like this ( {{url hostname}} is the macro that holds, well, the hostname) :
Then insert the macro name ( {{Google ID}} in the example in the screenshot) in the "Tracking ID" field in you Google Analytics Tag and it will be set according to the domain name. If you want more domains just add a row to the lookup table.