We have two platforms, a marketing site and a SaaS solution.
The marketingsite is on the main domain like www.domain.com and the SaaS solutions is on our subdomain sub.domain.com.
I would like to track the conversion rate of the customers signing up on our SaaS solution through our marketingsite.
If I go into goals for the marketingsite I can choose a relative path to the goal like www.domain.com/signup-completed, but the actual signup is on sub.domain.com/signup-completed. How can I track this on the marketing site?
The two sites are setup as different properties under the same account.
First of all, the property must be same for both subdomain and domain, i.e. same UA id.
Secondly, to track goals from sub domain, you need to include every part of the URL in the Page dimension. Normally you will not be able to distinguish which page is on which domain
For the above you need to create a filter that would modify the URL to include domain:
Steps:
In the View (Profile) Settings page, click the Add Filter link.
Choose Add New Filter and provide the filter a name.
Choose Custom Filter and select Advanced on the Filter type settings.
Under Advanced settings:
FieldA should be set to Hostname
FieldB should be set to Request URI
Set the values for both Field A and Field B to (.*), which is an
expression that captures all characters.
Set the Output To --> Constructor option to Request URI and provide
$A1$B1 as the value for that choice.
Your reports will now show:
www.domain.com/example.html
sub.domain.com/moreexample.html
This will capture the www.domain.com portion of your URL and include that at the beginning of your page URL in the content reports section.
You can then easily set the goals :)
PS: I would recommend to create new view, place this filter and then create goals, so that the data in other views wont be affected
Related
In the past, with older Google Analytics accounts and properties I was able to use a Custom Report on a View to show a table of Full Referral URLs.
But with Google Analytics 4 (GA4) I can no longer have Views, so I'm at a loss how I can show Full Referral URLs? I can show the Referral Source (domain name only) but I'd prefer to see the full Referral Path.
Any ideas how I can go about this?
Thank you.
Closest I can find is to use the Explore tab to create a new Exploration with the following settings:
Variables
Dimensions: Page referrer
Metrics: Active users
Tab Settings
rows: Page referrer
show rows: 500 (optional)
values: Active users
cell type: Heat map (optional)
filters: (exclude any URL patterns here)
Then minimize the Variables and Settings panels.
This will give you a long table of full referrer URLs along with the number of users that came from there. In my case most are domain names, but a handful are full URLs pointing to a page.
It remains to be seen if this can be done more easily or more comprehensively.
Example: I have 3 sites, a.com, b.com, and c.com. How can I keep track of the traffic that starts out at a.com and ends up at c.com, using Tag Manager and Universal Analytics?
I know that using referral source is an easy enough thing to view in UA, but I really need referral referral source because UA only uses the most recent referrer, not a referrer n sites back.
Please note that this question is not just about cross-domain tracking, rather keeping track of a site visited before the current referral.
Using GTM
If you use GTM (Google Tag Manager), you must create a permanent variable that contains the domains where your site might go to or be visited from.
Lets call it "myDomains". It would be like this:
myDomains : permanent : "a.com,b.com,c.com" (without quotes)
After this, in your pageViews tags, you'll need to set some fields:
In "more configurations", go to "fields to set" add some fields and set the following properties:
Field Name : Value
allowLinker : true
And, if you use multiple sub-domains, add the following:
cookieDomain : auto
Now, still in the "more configurations", under "Cross Domain Tracking", you will use the variable myDomains (that we created before) on the "Auto Link Domains" as this:
{{myDomains}}
Now you just have to save it and now you can track your multiple domains.
Hard-Coded
If You don't use GTM and insert the tags directly to your source code, then what you need is similar to what we did in GTM:
ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['a.com', 'b.com', 'c.com'] );
Note that just like we did in GTM, we:
set the cookieDomain (implicitaly with "auto")
set the field "allowLinker" true
set the "autoLink" to an array of strings, each one containing one of the domains that will send/receive visitors to/from your site.
Note: if you use the same domain but just diferent levels of sub-domains, you will just need to set the cookieDomain to auto, no need for Cross-Domain.
Further reading
Google guide for this implementation
There is no real way to do this within the GA interface.
What you could do is create a new GA property that all these websites send data to (if you haven't already done so).
Then create a filter for this property that appends the hostname to the request URI. You can learn to so this here in the Google documentation. This will allow you to see the full URL thus allowing you see all websites.
I would then create two custom dimensions: sessionId and hitTimeStamp. These can deployed through Google Tag Manager. An article by Simo Ahava found here explains well how to do this.
Using SQL, you will be able to partition page by sessionID and order by hitTimeStamp to give you a view on page flow across each website to c.com.
I do not fully understand your use case, but you can catch the original referrer, store it somewhere (e.g. in a cookie) and then send it e.g. via the url to the following page. Then you catch the query parameter and use it in a set call:
ga('set', 'referrer', '<original referrer>');
ga('send','pageview');
For all hits following the set call GA will record the referrer as the value of ">" which you replace with your captured value.
I have an extremely weird filter issue with Google Analytics and Shopify. It used to control spam referral issues and control page views for just the store.
A view is setup that includes only the store's subdomain and its checkout based on the hostname filter field. I have tried these filter patterns:
store\.domain\.com|.*shopify\.com
store\.domain\.com|checkout\.shopify\.com
^(store\.domain\.com|checkout\.shopify\.com)$
The only pages included have a hostname of store.domain.com. No pages on shopify.com ever get included. It's only when the filter is removed altogether that page views on the shopify.com start appearing.
Here's where it gets weirder.
I have an unfiltered view setup where I run the exact filter patterns on the hostname as an advanced segment. Pages on the sub-domain checkout.shopify.com show for any of the filter patterns.
Secondly, I confirm the pages disappearing in the analytics reports have a hostname that is exactly:
checkout.shopify.com
Any further debugging ideas? Possible explanations?
The reason why your filter isn't working is because the Checkout at Shopify uses virtual pageviews instead of the regular ones, in order to have neat names that make your reports and funnels clean instead of leaving a bunch of meaningless IDs like the ones you see in the URL. These pageviews don't contain a hostname.
Now you may be wondering why it worked in your advanced segments. If you check your Hostname report (under Audience > Technology > Network) you'll see the checkout.shopify.com hostname there, but with 0 sessions and some transactions. That's because it was the ecommerce tracking code that sent the hostname value that you saw in your segment, not the pageview.
One solution in this case is to create your filter in two steps.
1) Merge the Hostname and Request URI into Custom Field 1 with an Advanced filter. If Hostname is your Field A, make sure you leave "Field A Required" unchecked.
2) Filter the custom field for store.domain.com|/checkout
On a side note, my preferred method to avoid spam in to simply create a new property. You'd be surprised how most spammers only target UA-XXXXX-1 and leave alone all others properties. They are probably just using the Measurement Protocol to send fake data and they generate the IDs programatically instead of actually going through the trouble of finding the code on the site.
I hope that helps, and don't hesitate to contact me or Shopify's support if you need any extra help.
I am using Google Analytics in an embedded form. This form will be placed on various websites, and I want to track the traffic with GA. Creating a new property in GA for each website that embeds the form is not an option. As such, I'm looking to track traffic from all the websites using one GA Tracking ID and segment the data by domain. However, I'm having trouble figuring out how to customize the GA code snippet to do that -- everything I find refers to the old classics GA code and not the new universal code. Can someone please help?
Thanks!
You do not need to customize the code, the domain is tracked automatically in GA in the "hostname" field. Go to your GA admin panel, set up a new view, create an "include" filter and set field to "hostname" and the value to the hostname that you want to track. Repeat for all your domains.
You can create up to 25 views per property.
If you do not need a permanent solution you can track everything to one view and create segments based on the value of the hostname field. Or even more ephemeral, set the secondary dimension to "hostname" in your data tables and use the filter in the upper right of the table to filter by value of the secondary dimension.
Google's official answer is here: https://support.google.com/analytics/answer/1012243?hl=en
by default GA is only showing URI, without hostname. You could follow above link, to add a filter to "include hostname in URI".
this video could be more instructive: https://www.youtube.com/watch?v=tcBg6QfgWR8
I've a site which allows users to register, creating a store front page like a shopping cart for them to customize. Each page is a subdomain of the main page, and is coded using one jsp.
Eg: User creates store front page named "abc", his store front page will be abc.mydomain.com
Is there a way to track these different subdomains individually separately using google analytics programmitically?
I've googled and currently did it by creating views and filters, but as i researched there are no way to create these views and filters programmitically, having to go to the google analytics page to create at there. I saw there is also a limit of views one can create thus am wondering if there are any other solution to this.
Thank You
You can use the Management API to create, update, and delete profiles, but as you've found out there is a limit of 50 profiles (views) per non-premium account. I would say to use advanced segments to segment out hostnames, but again there is also a limit of 100 advanced segments per view. One idea (and I haven't tested this) could be that when a user creates an account, they create a sub subdomain abc.foo.mydomain.com, and after there have been 100 sub subdomains created, switch the subdomain to bar.mydomain.com, etc. This way, you could get 5000 possible combinations. Again, you would want to test.
One other option, and this is similar to what Shopify does, is to have the user input their own GA account through the admin - but the downfall of this is that you (the site designer) wouldn't have visibility into that subdomains data.
Anyway, hope this helps.