Say I have a website where the main page is mydomain.com/
Then I have a shop subdomain where the main page of the shop is shop.mydomain.com/
I have set up cross domain tracking and that's working fine. I'm a bit confused about how to track the following as a funnel:
mydomain.com/ -> shop.mydomain.com/
Since the funnel setup doesn't consider the domain and the path is both /, wouldn't GA see this as the same page?
If you'd like to see the domain name as well as the Request URI in your reports, create an Advanced filter for your view with the following settings:
Filter Type: Custom filter > Advanced
Field A: Hostname
Extract A: (.*)
Field B: Request URI
Extract B: (.*)
Output To: Request URI
Constructor: $A1$B1
Source
Related
Here's my setup: I am collecting information inside of Messenger and passing the data to a pixeled WordPress bridge website via URL parameters: www.mysite.com/?first_name=fname&last_name=lname.
This bridge website then will automatically redirect to the destination site on a different domain (www.mysite.otherdomain.com) that has the form that I want to be filled with the information collected in Messenger.
Here's my question: How can I automatically pass the URL parameters from the bridge page (mysite.com) to the destination site (mysite.otherdmain.com)?
You can run some javascript to change the destination links:
something like:
document.querySelectorAll('a').forEach(function(a){
a.href=a.href+window.location.search
})
This will look through all the links on the page and will add the url parameters (window.location.search) onto each link
You may want to refine this to:
check that there is not already a querystring on the destination url
only make the change if there are query parameters present
limit the urls that are changed (if for example you do not want to change menu items on the page
Let say the situation is
User type "http://siteA.com" without pagename or querystring in the browser's address bar then click "Go"
IIS receives the request and redirect it to "https://siteB.com/page1.aspx?id=1234"
IIS receives the response from "https://siteB.com/page1.aspx?id=1234"
IIS rewrites the url to "http://siteA.com/home" so users will see this url in their address bars.
At this state, any links on "http://siteA.com/home" must have http://siteA.com as domain name in URLs. Users should see the links like below links
http://siteA.com/page2.aspx
http://siteA.com/page3.aspx
page1.aspx, page2.aspx, and page3.aspx are actually hosted on https://siteB.com
How many rewrite rules do I need? How to write those? How to set up ARR? Any working examples would be helpful.
You asked a lot of questions at once, but in summary, you don’t know much about URL rewriting. So I suggest you take a look at the Microsoft documentation: URL Rewrite Module
I have a "short URL" MVC website that takes in an identifier and redirects the user to the end resource based on that identifier.
Prior to the redirect I create a web request to Google Analytics (GA) to track which identifiers are commonly used. I would also like to track some more information using campaign/source/medium options in GA but I'm having a tough time getting these to show in the reports - the link I'm using is below (utmac switched out for obvious reasons):
https://www.google-analytics.com/__utm.gif?utmdt=ShortUrl+Redirect&utmp=%2f3f20118&utmac=UA-9999999-99&utmcc=__utma%3d.1675621744.1591667140.64981.1591667140.64981.1591667140.64981.1%3b%2b&utm_source=TestSource&utm_medium=TestMedium&utm_campaign=TestCampaign
I see the hit but it shows with a medium of "(none)" and source of "(direct)" when I'm expecting to see "TestSource" / "TestMedium"... Is it that I'm constructing the URL wrong or a miss in GA setup?
I've also tried putting the utm_source/campaign/medium as part of the utmp address as query string values but no luck: https://www.google-analytics.com/__utm.gif?utmdt=ShortUrl+Redirect&utmr=0&utmp=/3f20118?utm_source=TestSource&utm_medium=TestMedium&utm_campaign=TestName&utmac=UA-9999999-99&utmcc=__utma%3d.29260146.1591743271.10202.1591743271.10202.1591743271.10202.1%3b%2b
You have to add utm parameters to the querystring of website URL.
I have an ASP.NET e-commerce application in which product URLs are primarily of the format
<domain_name>/ProductCatalog/Product.aspx?ID=30
I am using IIS URL Rewrite to successfully write this URL as
<domain_name>/ProductCatalog/Product/30
Let's say the product name is "XYZ Item" for ID = 30 in the database, then I would like to do the lookup and rewrite the URL as
<domain_name>/ProductCatalog/Product/XYZ-Item
I am not sure how to go about this? Please point me in the correct direction.
I have two domains mysite.com and mysite.cz and I want to see traffic sources for both domains, which i currently can't as i am tracking only ".com" domain. Any ideas how to achieve that?
You need to implement cross-domain tracking between the two sites, which isn't trivial. There's good advice here:
Google Analytics Cross Domain Tracking and _setDomainName()
In addition to s6mike you can also implement the Cross-Domain Auto Linking plugin:
To simplify the cross domain linking proces say you have a website hosted on source.com that you want to track with cross domain tracking:
destination.com
test.destination.com/page2
test.dest3.com?page4
Code
//Load the plugin.
ga('require', 'linker');
Define domains
// Define which domains to autoLink.
ga('linker:autoLink', ['destination.com', 'dest3.com']);
or define with regular expression
// Define which domains to autoLink using a regular expression.
ga('linker:autoLink', [/^example\.(com|net)$/]);
set allowLinker configuration parameter to true
ga('create', 'UA-XXXXXX-X', 'auto', {
'allowLinker': true
});
resource
https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain#autolink
EDIT
Once you have domain linking established, you will see only the request URI in the content reports, and not the top-level or sub-domain for a given page.
Set up a master view (profile) for your primary domain without filters.
Create a view (profile) especially for cross-domain tracking and re-use master tracking code
View (Profile) Settings page -> Add Filter link
Add New Filter
Custom Filter -> Filter type settings: Advanced
FieldA to Hostname & FieldB to Request URI
Set the values for both Field A and Field B to (.*)
Set the Output To --> Constructor option to Request URI: $A1$B1
Your reports will now show:
example.com/index.php
example.net/more.php
example.cz/more.php
resource
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite?csw=1#keyComponents