I have a website that only has a full window iframe to a page that already has google analytics, but not on my account(the page isn't mine either). I would like to track my website with Google Analytics and if I put the script in the head site it will say "Tracking not installed". IS there any way to make the browser ignore the google analytics from the iframe?
If the iframed GA account isn't yours then there is nothing you can do about it. However you can still implement your own analytics by simply doing what you were doing before and putting your own GA code on your pages. You will see that tracking not installed message because it normally takes at least 24 hours for the code to register. In the meantime if there is nothing else wrong with the implementation, you can check in your Real-time reports to see if your own simultaneous visits are recorded. If they are then you are good to go and just need to wait 24 hours for data to show up in your standard reports.
You cannot change the content of the iframe, it would violate the same origin policy. Are you sure you should be using an iframe at all? Either way you can easily add Google Analytics to your own site and track whatever you need with your own Google Analytics ID.
If your analytics code is in the iframe, Google will report that tracking isn't installed as they're checking the parent page, not the iframe. Tracking will still work, though. You should see stats come through normally.
Related
All,
I have recently run into an issue where my bounce rate on my website www.x3tradesmen.com dropped significantly (less than 10% and sometime even 0%). I have read multiple threads trying to solve the issue and have downloaded a chrome extension "Google Tag Assistant". The extension is telling me "Same web property ID is tracked twice."
I cannot find how or where the web id is being tracked twice because I only have the GA script installed one time within the Avada theme options. I do have Google tag manager connected as well, however, it has been connected for a while and I never noticed a drop after installing it.
The most recent changes that I have made to our website is:
Installing SSL certificate and "Really Simple SSL" plugin so my website is now https://www.x3tradesmen.com instead of http://www.x3tradesmen.com
I have an old website x3staffing.com that I recently 301 redirected to go to https://www.x3tradesmen.com via the .htaccess file (GA script was removed from this website just in case)
Installed W3 Total Cache plugin for basic cacheing features
Can anyone assist me with solving this issue and how I can make sure that web property id is only being fired once??
Thanks in advance!
See Image
After receiving detailed information from Codeseer, I was able to identify that I was tracking all of my pageviews with a Google Tag Manager tag. I also had the Google Analytics script installed on my website, therefore, the web property ID was firing twice. I never made any changes to my original GTM tag so I am not sure why it all of the sudden started tracking twice but ultimately the solution was to remove the Google Analytics script and only use Google Tag Manager to fire the GA script. Thanks for all the help!
Bounce rate issue is occurring because the page view is being fired twice.
Bounce is calculated based on when a user has a pageview and then no other interactive actions. So Google Analytics is thinking user navigated to homepage and then navigated to homepage again. Thus user did not bounce.
(Your Exit Rate should be a more accurate representation of bounce rate if you are looking for a temporary solution to get that data.)
Looking at the network requests it appears that a pageview is being fired by the original Google Analytics script as well as by Tag Manager.
Perhaps something changed recently in your Tag Manager to add a GA tag?
So basically, we are having issues with a website (https://thesoundshop.com) in which the PPC traffic source (it only seems to be PPC traffic that is affected) is being changed by the pageview that we are pushing through to analtics.
The website runs on Ajax so we have to use Javascript to emulate pageviews through to Analytics whenever a link is clicked on the website. We are not using Google Tag Manager to implement the analytics or javascript because of this so we are using the gtag method exactly as Google's documentation recommends:
gtag('config', 'GA_TRACKING_ID');
I have tested this by visiting the website through a PPC ad and watching the real-time reports in Analytics. The first page load attributes the correct source to the traffic (cpc) as expected but then when I click on a link to go to a different page, the traffic source changes to Google Organic search. I then complete an action that I know will trigger an event or a goal and then when this appears in the Goal Reports, it attributes the goal as organic, too.
We know that this has to be down to the Javascript pageview that is being pushed to analytics to simulate that a new page has loaded but we can't work out why it would be changing the traffic source. The gtags are implemented exactly as Google recommends; just wondering if anyone else has had this problem and if so, how did they go about fixing it?
We had the same issue and after some more research found the problem along with the solution, thanks to Simo.
Basically, you need to manually set the document.referrer of the first session to make sure it persists and does not get over-written half way through the session. It's a known issue with GTM and single page applications.
I installed Google analytics on my localhost and I am able to see the activities of the visitors on the real-time beta part but I am not able to see any report on the standard report part . Also on my account "The Google Analytics tracking code has not been detected on your website's home page" is shown.
Where is the problem here?
The "detection" mechanism crawls your site to see if it can find the code. It's a courtesy feature, applicable to very basic usages only.
But, it can't access your localhost (since its not available to its crawlers; it's trying to crawl whatever domain you have configured as your account's domain.
The regular reporting in GA is not in real time. It might take some time. Assuming you haven't manually set any incorrectly configured profiles, if your data is appearing in Real Time, it will eventually show up in Standard Reporting.
PS: Be sure to set the date selector to today's date; by default, GA shows data from 30 days ago until yesterday.
Check whether you have put the Script which is given by the Google Analytics inside the header tag of the homepage
AdSense use javascript to catch the keywords of current page to display relevant ads. But I was recently noticed that it will show ads related to my browsing history too. It seems that the javascript code can read my cookie (in general I mean, e.g. list of domains visited) to display relevant ads.
Is it practically possible to read cookies of a visitor?
No, it isn't possible to do so directly due to the same origin policy. (If it were possible, then you could make a page that stole the session of anyone on any domain!)
However, many websites include code from ad providers (read Google) on their page -- so that Google knows that you have visited website X because website X allows Google code to run when someone visits it. When you later visit website Y and it asks Google to display some ads on its behalf, what happens is no mystery.
Google knows all.
I have recently looked into this and discovered that using FBML pages in a facebook fan page, I can add fb:google-analytics tags or image tags to track page visits. However I have found no method of tracking visits to other facebook tab pages, like "pictures" or "wall".
Is there a way do this?
Thanks
There is no way of doing this with Google Analytics.
There used to be a hack that embedded a php file as an image, and that request tracked a pageview. However, a change to how Facebook renders pages makes this hack/plugin useless (it looks like it stopped working on September 7th). Basically, it looks like they're caching any external images onto their own servers, and thus breaking this hack. Short of there being an officially supported plugin, or Facebook allowing Google to track more, this is likely a dead end.
Edit: With Facebook tabs, you can install an iframe app as a tab (not using FBML), and you can put Google Analytics on the tab. But, since its an iframe, you don't have access to real referrer information, and Facebook spoofs its referrer, so there's no way for the iframe to detect anything about the page. But this is only for the tab, not for the wall or photos.
Another important thing to note is that the cookies are still being set on your domain, so it might make sense to keep the account on your main account, but use a special configuration on the tab.
Here's the best practice I've settled on for putting Google Analytics on a Facebook tab iframe:
First, the iframe URL should contain the URL parameter ?utm_nooverride=1. This is so if the user already has referral cookies (for example, if they got to your site before via Google, the pageview will persist with that referral source.)
Second, I override the referrer value (which is useless, since it is spoofed by Facebook) to be tab.facebook.com, to make it simple to differentiate from other traffic.
Finally, I place 2 custom variables: One page-level, and one visitor level. The former allows me to easily know what pageviews occurred from within the tab. The second allows me to track the rest of the interactions my site has with this person if they end up returning to my site. That code looks like this:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-1']);
_gaq.push(['_setReferrerOverride', 'http://www.tab.facebook.com']);
_gaq.push(['_setCustomVar', 1, 'is_facebook_page', 'true', 3]);
_gaq.push(['_setCustomVar', 2, 'visited_facebook', 'true', 1]);
_gaq.push(['_trackPageview']);
Facebook does provide some limited analytics capabilities called Facebook Insights:
http://www.facebook.com/help/?faq=15221
Also outgoing links will be tagged with a tracking code so you can pick up which traffic is coming from your Facebook pages to your site.
However you cannot embed Google Analytics or Yahoo Analytics directly into the pages.