Google Analytics - block outgoing links - google-analytics

I'm building a site which contains external links, however, I don't want any links from my website to show up in another site's Google Analytics tracking.
For example, if www.site1.com links to www.site2.com I don't want the link from www.site1.com to show up as link referral or source.
Not sure if this is possible.
I couldn't find this elsewhere, but not sure if I'm using the correct search terms(?)

You can override the traffic source/medium via utm parameters.
Check out this page for help in generating the URLs.

Related

Affiliate Link Error with AMP

I'm using SEOFrog on Wordpress to show the AMP version of the website. It works great, but there is one little problem, especially for affiliate websites such as Plus500 (with a very strict tracking).
When I'm visiting the AMP version of my website (for example: google.it/amp/www.mercati24.com/come-funziona-plus500/amp/?client=safari) and I click on one of the affiliate links of the broker Plus500, such as plus500.com/it/Marketing/Promotion1.aspx?id=11693&tags=Mercati24Post061213&pl=2 . The affiliation campaign shows an error, because the domain is not mercati24.com but google.it instead.
I don't think the broker will whitelist https://www.google.it/amp/www.mercati24.com/, so is there any way to fix this error by just changing the code on the website?
Thanks in advance,
M
Link to non-AMP page which will then redirect to affiliate link.
Referer will be your domain.
AMP pages are cached by Google; in fact - when you create an AMP version of your webpage - you make Google the owner of that page. As a result, when a user clicks on a link in an AMP page, the referer is google.com instead of your domain. This behaviour makes AMP pages not really suitable for tracking purposes, as they are always served from google.com; for such scenario’s (like tracking and affiliate programs) you need to serve pages from your own domain, not from Google’s AMP cache servers.

Best way how to track iframe separately from the site on the same domain

On my site I have feature for users, that they can embed video on their page with iframe. Now I'm tracking classic page view and iframe view same way. So my analytics stats are not correct. I wanna separate this tracking to know how much of visitors I have on page and how much of them on iframe. I'm using google analytics.
I'm looking forward what do you suggest.
BTW: I am using special url for embeded video but still on the same domain.
Since you've got a special URL for the embedded video, you could use filters to include or exclude that URL for a Google Analytics profile, and keep the same analytics code on every page.
I'd recommend:
Keeping one profile unfiltered, showing all traffic
One profile that filters out the iframe URL
One profile that only shows the iframe URL
More info about Google Analytics accounts & profiles
Can you add a simple GET-Parameter in your URLs? For example: http://www.website.com/video.flv?type=embedded
or
http://www.website.com/video.flv?type=extern
Unfortunately I don't know exactly, how Google Analytics handles same URLs with various GET-Parameter.
Other way is using a simple redirect script or htaccess rule.

Can Google analytics be hosted on a different URL embedded in an Iframe

I have a website www.site.com that contains a iframe which embeds another site www.another.com which contains google analytics code. Now if a user navigated to my website at www.site.com will the google analytics code in the iframe for www.another.com track that user? If not is there a way to solve this?
Yes. There is extensive documentation about this over here.

Filter Data from a specific Referer in Google Analytics

I am using google analytics on my web site. I would like to see the traffic/counts of people coming from a specific domain. How I can set this up in google analytics? For example, my site is wwww.foo.com. I would like to know how many people are landing on my site from www.bar.com (or get referred from www.bar.com). Would be very helpful if someone was able to share steps to set this up in google analytics.
Thanks so much -
In the "Standard Reports" section of your reports homepage, you can go to
Traffic Sources > Sources > Referrals
Then on the right, just above the metrics is a search field. Just type in "www.bar.com" and click the spyglass icon.

Google Analytics - only track traffic to a folder of the site

I want to track traffic for mysite.com/current-campaign/ and careless about traffic on mysite.com in general.
Is it ok to place the GA tracking code in the files inside the /current-campaign/ folder or does it HAVE TO be in the root of the server for tracking to work?
GA will only track on the pages you actually put the tracking code on, regardless of where the page is located (unless you start messing with things like domain settings or filters etc..).
So IOW yes, it is okay to do that. If you don't have tracking code on mysite.com/somePage.html then it's not gonna track that page (though it might show up as the URL in some reports like referring URL or exit link or whatever, same as any other page you don't track)
In Google Analytics, you can add a filter to the profile and filter all but the chosen directories. Go to Analytics Settings > Profile Settings and look for "Add Filter" link.
In addition to Crayon's answer, you can limit tracking to a subdirectory by using _setCookiePath() function in your tracking function. See Analytics documentation on single subdirectory (note the link anchor is not resolved to a correct header, at least for me).
This is advised in the documentation to use when you only want to track a subdirectory and avoid clashes with Analytics trackers possibly in use in other subdirectories.
I work for a department in a large university.
The department's web page resides at www.some-uni.com/department-name/.
I only have FTP access to the sub-folder /department-name/ and nothing else on the site.
It was quite easy to get Google Analytics to track traffic within the subfolder /department-name/, ignoring the rest of the site. All I did was create a profile in GA, setting the default url to www.some-uni.com/department-name/. I then pasted the tracking code into the pages I wished to track.
It took about eight hours for anything to show up in GA, but after that it worked just fine.

Resources