ramyothman / dotnetanalyticsapi Goto Github PK
View Code? Open in Web Editor NEWSimply .NET Project for Analytics API Usage
License: MIT License
Simply .NET Project for Analytics API Usage
License: MIT License
Firstly, thanks for writing the great library!
I am trying to use a custom dimension and I found that I can get a type using:
Analytics.Data.CustomVariablesorColumns.Dimensions.dimensionXX
But I do not see a way to specify which of my custom dimensions to use. How would I use a custom dimension with the library?
Thanks in advance!
I am so thankful for what you have done. I would be stuck without it.
I am having some small issues.
I can't figure out how to use the filters. I don't see anything on it in the documentation, and I'm not that smart.
I am using this code:
List<Analytics.Data.DataItem> metrics = new List<Analytics.Data.DataItem>();
//metrics.Add(Analytics.Data.Visitor.Metrics.visitors);
metrics.Add(Analytics.Data.Session.Metrics.visits);
//metrics.Add(Analytics.Data.Session.Metrics.timeOnSite);
metrics.Add(Analytics.Data.Adwords.Metrics.adClicks);
metrics.Add(Analytics.Data.Adwords.Metrics.adCost);
metrics.Add(Analytics.Data.Adsense.Metrics.adsenseAdsClicks);
//metrics.Add(Analytics.Data.Adsense.Metrics.adsenseRevenue);
metrics.Add(Analytics.Data.Session.Metrics.Calculated.visitBounceRate);
//metrics.Add(Analytics.Data.Session.Metrics.
List<Analytics.Data.DataItem> dimensions = new List<Analytics.Data.DataItem>();
//dimensions.Add(Analytics.Data.GeoNetwork.Dimensions.country);
//dimensions.Add(Analytics.Data.GeoNetwork.Dimensions.city);
dimensions.Add(Analytics.Data.TrafficSources.Dimensions.campaign);
dimensions.Add(Analytics.Data.TrafficSources.Dimensions.keyword);
List<Analytics.Data.DataItem> filters = new List<Analytics.Data.DataItem>();
filters.Add(Analytics.Data.Session.Metrics.visits);
System.Data.DataTable table = manager.GetGaDataTable(DateTime.Today.AddDays(-5), DateTime.Today, metrics, dimensions, filters, metrics);
Unfortunately, it seems to filter off all results. I want my list to include anything that has over 50 visits. How would I do that?
You can also see that I have commented out adsenseRevenue, and timeOnSite. Both of these metrics throw a conversion error something like this:
String was not recognized as a valid DateTime.Couldn't store <0.0> in timeOnSite Column. Expected type is DateTime.
and...
Input string was not in a correct format.Couldn't store <2.52E-4> in adsenseRevenue Column. Expected type is Decimal.
I'm not smart enough to fix either problem.
I would really appreciate any help that you would be willing to provide.
Thanks,
Mike
Hi,
I want to convert avgTimeOnSite to minute, what should i do? I couldn't even find a solution in google :/
Hi there,
i've got this error today (there was no error yesterday ).. i tried to solve but i couldnt. There is no problem at local mach., i've got this message on server mach; http://prntscr.com/3jeunz
By the way, i didnt exceeded any limit. And also i'm on shared hosting i cant change server settings (NTP settings, like Google says; https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtAuthorization#helpme ).
Can u help me ?
Thanks for the work!
I'm getting always the following error ๐
" Please set a default profile first using SetDefaultAnalyticProfile method"
My code is exactly the same with you.
Hi, I came across your library when needing to build a web service that will connect and pull data from Google Analytics using a Service Account. It's great.
However I had only one problem .. in AnalyticsManager.cs, in the GetGaData method, when it calls analyticsService.Data.Ga.Get with the parameters I provide and calls request.Execute, the execute method takes approx 35 seconds to return data, seemlingly regardless of the dimensions, metrics, filters or sampling level.
Have you seen this issue?
Hi Guys,
when you go to https://ga-dev-tools.appspot.com/explorer/ the dimension ga:Date is supposed to be a STRING, but when uysing this api it returns as a date time, anyone else have this problem ?
Cheers
Niro
Hi,
When i try to run Analytics test I get the following error:
An exception of type 'System.Security.Cryptography.CryptographicException' occurred in mscorlib.dll but was not handled in user code
I'm not sure why i get this issue.
I have done the following:
Added the ...gserviceaccount.com to my Account user management
In the code added the e mail to Analytics.AnalyticsManager manager
Added my profile number manager.SetDefaultAnalyticProfile("999999999");
I'm not sure if I meant to change anything else or am missing anything?
Any help would be much appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.