google analytics code in dynamic pages with embedded pdfs - google-analytics

i'm not a programmer. My website has dynamic web pages with embedded pdfs like http://www.indec.gob.ar/uploads/informesdeprensa/emi_10_16.pdf
According to Google Tag Assistant, the GA tracking code is inserted in most of my website http://www.indec.gob.ar, but it is not in the dynamic web pages with embedded pdfs.
Is it possible to insert the GA tracking code in all the dynamic web pages with embedded pdfs? How should I do it?

The Google Analytics javascript tracking code cannot be embedded in a pdf, so you are out of luck here.
A possible workaround would be not to have direct links to pdf documents but run requests through an html page that sends a tracking request before the user is redirected to the pdf. Easiest way would be to use a html page with the javascript tracker, or you might alternatively try some serverside download script that send a request via the measurement protocol.

Related

Tracking PDFs through Google Analytics

I'm hosting a website through Github and I have pdf files hosted on it. The pdf file is accessed by directly using the URL and not by pressing a link. So, the only way to access the PDF is by typing http://website.com/resume.pdf.
I was wondering if its possible to use google analytics to see who visits the specific PDF file, and how to do it?
Google Analytics is usually implemented via clientsite (javascript) tracking code. Since you cannot embed that into a pdf document you cannot use it to track direct downloads.
What you can do (presumably, I'm not familiar with how Github hosting works) is to set up a "proxy" page that records the hit and then redirects the user to the download. You would redirect all requests to PDF files to this proxy page (via htaccess or similar) so your existing urls remain valid. Then you can track the hit (either via JS or serverside with the measurement protocol) and fetch the document based on the original request url.

Google analytics for a page not loaded in browsers

I have an aspx page (without javascript) which is called by different systems (in other words custom component written in dot net and php). I want to enable google analytics for this aspx page. Is there a way to enable google analytics on a page which is not loaded in a browser

Google Analytic Tracking for an entire server?

We currently use google accounts for our site ibiblio.org. Setting up the tracking on our landing pages is no big deal. But, we have tons of "collections" on our server, which as a public service, we allow a ton of users to host their own website installs (usually wordpress or wikis). Here is an example of a collection
These installs exist on a server, each install is a subfolder. Is there a way we can track the activity of these subfolders (or installs) without having to inject tracking code into each of their HTML files? We have a lot of contributors, so injecting code could get messy.
Thanks so much for your time and help.
There are ways, depending on the server's programming language, to create google analytics requests every page load (i.e. whenever page requests are fired). Tracking an entire site is not possible if the HTML files are served statically, because GA wouldn't know a page load happened.

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.

Is it possible to display Google Analytics reporting interface in an IFRAME?

Has anyone had much luck in embedding the Google Analytics reporting interface in an IFRAME?
We'd like to add an "Analytics" tab to our CMS which displays the Google Analytics for each specific page. So, the user could view a page in the CMS, and see the analytics for that page right in the interface.
We have everything worked out, and we're bringing up the correct URL in the IFRAME. We get the Google login page, but when we log in, Google "busts" the IFRAME and loads the analytics page in the full window.
Is there anyway to keep Google Analytics reporting interface in an IFRAME?
Why not use the Google Analytics Data Export API to access the data and build your own reports?
It's not possible to IFRAME Google Analytics.
A work around to this is to build a chrome extension and append your codes/page into analytics site via content_scripts to put some "toolbar" on top or to do some modifications you want.
This is what I'm doing at the moment, sorry that I couldn't share the chrome extension code at the moment.

Resources