Comments (9)
I'm having the same problem. It seems that this does not work when the google analytics property is set to "app".
Although the description linked in the readme tells us to create an "app" analytics property.
(I didn't test any other google analytics properties)
I have had the same issue with every other google analytics framework/project. None seem to work with an "app" analytics property.
PS: I used the sample project included in the download to test this, with the only change being replacing the property id with mine. I tested it last week and the property was created a week before the test, so it can't be a delay problem
from csharpanalytics.
You're right. I've changed my property type from "app" to "Website" and it now works.
From what I've been reading the "app" property works with posting xml (at least in android sdk) and not by get requests to dummy images in the google analytics engine.
from csharpanalytics.
Yes, sorry this is a known issue I should go and put in the README.
All the reverse-engineering I could do/find online was around the web site parameters.
Google have a new Measurement Protocol that is fully documented including for apps but that's currently in closed beta.
In the mean time we can either use websites or try and reverse engineer the Android/iOS calls.
from csharpanalytics.
I just setup an Android VM and added some simple tracking from Google's latest API. It looks like they are already using the Measurement Protocol in these SDK's even though there is no mention about signing up for the closed beta. It's possible it's beta only for web sites.
I'll take a look at adding support for the new Measurement API in the next few days.
from csharpanalytics.
You're right. I have 2 google analytics app properties. One was accepted for the closed beta, the other is a normal app property not in the Measurement Protocol beta.
However I can use the Measurement Protocol for both without problem and it works great, real-time data with maybe 5 seconds delay.
This is the code I used (just replace the xxxxxx with your app property id and you'll get live data)
String payload = "v=1&tid=xxxxxxxxxxxx&cid=1234&t=appview&an=protocoltest&av=0.0.0.1&cd=PostNormalProp";
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("user-agent", "Mozilla/5.0 (PC; en-us) Windows 8 (KHTML) App");
Print("UserAgent: " + client.DefaultRequestHeaders.UserAgent.ToString());
var get = await client.PostAsync(url, getcontent(payload));
Print("Result Post Normal: " + await get.Content.ReadAsStringAsync());
Edit:
Note that the user agent does not seem to be in the correct format to report device type/data and os version. Should any of you find the right format to report these, I would appreciate a comment
from csharpanalytics.
Hmm, so it looks like they're putting a handful of the new protocol parameters onto the old UTM tracker. That's easy to add. I have some code to access device manuf and version but I don't think that should go in the user agent. Getting the OS version would require a WinRT component.
from csharpanalytics.
I was not asking for something like that. However Google Analytics has device models, os version and so on integrated and I would like to use it (and I guess others would too). I personally would just give the user the option to set all those parameters before they start tracking.
Google Analytics uses the user-agent to get browser, browser version, platform and platform version for websites. Since there is no other way to report these things for apps, I think it's used for device model etc. in app properties.
From the reference:
user_agent_string – Is a formatted user agent string that is used to compute the following dimensions: browser, platform, and mobile capabilities.
If this value is not set, the data above will not be computed.
The last sentence is not 100% true. In my tests my "appviews" were being computed even with no user-agent set.
from csharpanalytics.
Basic measurement protocol support is now in the measurement-protocol branch and it is recording real-time against application types. Need to add tests before I merge it back into master.
from csharpanalytics.
Measurement Protocol support appears to be working and is available for testing. Use the AutoMeasurement class instead of AutoAnalytics as a starting point.
from csharpanalytics.
Related Issues (20)
- GetEntryAssembly vs GetExecutingAssembly HOT 2
- ASP.NET support HOT 13
- Build break because of requestUri.ShouldUsePostForRequest() HOT 1
- Exception HOT 6
- Assembly.GetEntryAssembly can be null and causes crashes. HOT 3
- Windows Phone 8.1 Support HOT 1
- Prior requests cause null exception in BaseAutoMeasurement::Request HOT 1
- Exception on Start() HOT 8
- Starting multiple instances of a WPF application at same time throws Exception in Start()
- Add a flag AutoMeasurement.Initialized HOT 6
- Make internal classes public HOT 1
- TrackEvent exchange parameters action and category HOT 1
- Allow to use GA debug URL
- MeasurementAnalyticsClient.AdjustUriBeforeRequest cuts strings with special chars HOT 2
- Setting SetOptOut before Start causes crash
- Support WPF .NET 4.0 Client Profile applications HOT 5
- At one of my testing machines I get an deserializing error
- Session start and session end time stamps registered at GA are very often too late relative to other events HOT 3
- proxy support HOT 1
- Unhandled Exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csharpanalytics.