APIs to get most downloaded Files details from Google Analytics - google-analytics

We need to track the count of File Downloaded through Google Analytics.
We found that, through below code we can track the file download :
Download my file
This works fine.
But, in our website we want to show most downloaded(top 5) files in a specific section.
So, can anyone suggest that is such API available in Google Analytics to retrive top N number of downloads? Or should we go with the Custom tracking implementation to achieve this feature?
Thanks in advance,
Ashish Shukla

Related

How to link Google Analytics account to wordpress

I have read multiple tutorials on web but I'm unable to find my tracking I'd/code on my Google Analytics property list. This is the image which I got from web and I want to see m Any help will be appreciated.
You can simply use any plugin out there. Here are some of my favorites:
Google Site Kit. <== This is the official Google Plugin
MonsterInsights
ExactMetrics
GA Google Analytics <== Simplest and just for this purpose. No unnecessary code.
Note: There are many others but these are per my favorites list and liking.
1st plugin will auto-connect with your google account and you won't need to put any ID or code into your site manually. Hence easy to set up.
Site Kit by Google is great for WordPress users. By using Site Kit you don't need to manually insert the code, as depicted by the screenshot you share. The plugin can insert the code for you.
In addition to the placement of code, Site Kit can show you Analaytics and other data within your wp-admin dashboard!

Track count of views,likes and comments in a community site

Can anyone tell me how can I track number of views,likes,comments and shares in a collaboration and community site. This is not a Google site. This site was created using lumapps. It's a collaboration site, Which works similar to Google+, where you can write a blog, post and like/ share the same. I need a way of keep tracking the likes/shares/views on such posts or blogs, So that I can display the same in Google data studio.
I heard it's possible using Google tag manager. Can anyone confirm this OR let me know about anyways of achieving the same.
Thanks and Regards
Kumar
You would do this by sending an event to Google Analytics and using this source in Data Studios.
Please see reference on how to send events using Google Tag Manager and custom Variables.
https://support.google.com/tagmanager/answer/6106716?hl=en

Google Analytics API - extract information on Urls visited by users

I started to use the Google Analytics API in order to import the necessary information into R. It is working nicely, but I miss one important piece of information: in the Google Analytics website, I can have a look at hits by the domain on my website (e.g. /about, /data), but I cannot find this information in the dimensions and metrics explorer on the Google developer website...
Does anyone know how to extract this information?
Thanks in advance!

Cannot embed Google Drive Files in an iframe

I recently had a problem with the Google Drive API displaying my documents. We have developed a web application that is connecting to Google Drive accounts to retrieve a user's drive files, then display in an iframe the file using its embedUrl/alternateUrl.
This has worked fine for us in the past, but suddenly files other than Google Documents stopped displaying: html files, text files, doc files... even images!
The error I get is Refused to display 'https://docs.google.com/file/d/0B_JkNS6Wu4b5R2c0YlJSN0oyQUE/edit?usp=drivesdk' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
I understand the error, it means that Google is preventing the display of documents outside of the Google domain, but the question is "why suddenly now", and how to circumvent it.
If someone stumbled upon the same issue and have found a solution, I'd be glad to hear.
Thank you kindly.
https://docs.google.com/file/d/0B_JkNS6Wu4b5R2c0YlJSN0oyQUE/preview?usp=drivesdk
Use preview instead of edit in the URL. It will work.
I had the same issue and found the following workaround showing the google drive files as webpage ressources
https://support.google.com/drive/answer/2881970?hl=en
This means you have to extract the [doc id] from your url and change your link to:
http://www.googledrive.com/host/[doc id]
Please note: in this case the google drive controls are not shown.

Do I Still Need to Insert Analytics Code after HTML File Verification

After verifying my domain through HTML file verification should I also insert analytics code into Yoast SEO plugin or within functions.php file? Similarly, Is it safe to delete the html file after the verification?
Thanks,
Tahir
I'm guessing here but it sounds like you are confusing Google Webmaster Tools and Google Analytics.
I which case you'll have to keep the html file AND you have to insert Google Analytics code.
Google Webmaster Tools give you information about what people see in the search result list and if your site gets crawled correctly by Google. Google Analytics tell you where your visitors come from and what they do on your site, so these are quite different things.
Plus this probably belongs to webmasters.stackexchange.com (it's not exactly a programming question).

Resources