How to use Google analytics in a Xamarin project? - xamarin

I would like to use Google Analytics in my Xamarin project, but I always find articles showing how to use it with Firebase. Is that the only possibility? Can I use just Goggle Analytics without Firebase, as I use for example in my Angular project?

While the link to the repo google-analytics-dotnet-sdk created by me supplied by another another answer to this question.
Will work if you are using Universal analytics. It will not send hits to GA4. I have been working on a version for Ga4 but set aside while i wait for the Measurement protocol for Ga4 to be completed.
Currently the measurement protocol for GA4 does not allow for recreating hits similar to what is sent by the standard google analytics sdks for web and mobile.
Which means that you cant exactly recreate the same events.
Measurement Protocol (Google Analytics 4) I guess what I am saying is that if your goal is to recreate similar hits as firebase sends then your not going to be able to. We need to wait for them to open up for more of the Measurement protocol.
This is the current status of it.
GoogleAnalytics.Ga4-Dotnet.Sdk - Beta

Related

Trigger PubSub messages on Google Sheets save actions

I am trying to automate a Google Sheet import as soon as someone has committed their changes to Google Sheet's version control (and not just edited any cell like the onEdit event seems to trigger, I need it committed).
While polling is an option, I'd rather really have Google Sheets send out a message to PubSub. Now PubSub requires the authentication JSON and such and I haven't seen any integration with Google Sheets that integrates this concept, which surprised me.
I searched on the internet for triggers in Google Sheet and some way to automate code to connect to external resources. Apparently, the Google Drive Push Notification API seems to be the way to go. I'd really like to keep everything in my Google Cloud space so I went for a Google Cloud Function with an HTTP(S) endpoint. I already started working out the Function and PubSub channel when I went back to the documentation to read up on how to send a call to the HTTP endpoint.
Bad luck. Seems you need to register the domain to prove you own it and wishing I could, I can not prove that I own cloudfunctions.net. So there went my plan.
It seems very not-Google like to not integrate its Cloud SDK on Google Sheets triggers since they do offer a Sheets API using Cloud Service Accounts.
So my conclusion is I have two options:
1) I am able to send an HTTP callback on a onEdit() function but only if it's my own domain and I seem to require to set up an environment just for that.
2) I would have to poll the last version of the Google Sheets commit compared to the latest version to trigger it myself.
Am I overlooking something very simple or are these my only options?
Cloud functions count as an AppEngine Standard Endpoint as described here and here, and so do not require domain verification. You can use a cloud function using a Cloud Pub/Sub trigger freely- you don't even need to explicitly set up a subscription.
Edit: I didn't understand the OPs question correctly, they want to prove their ownership of a cloud function to the Google Drive Push Notification API, not Cloud Pub/Sub push. This should be possible through HTML tag verification as described here. In whatever framework you are using for your web server, you should be able to set the appropriate HTML meta tag on the response.

How to track UTM tags in App Store URLs

I'm working on implementing my own analytics system. One part of it consists of tracking where users originated from. I use UTM tags for this. Reading UTM tags from the query parameters is quite easy in Android, iOS and web. However, I also want to track app installs.
I want to be able to share URLs to the Play/App store with UTM tags and mark the user's first session in the app with those tags. Android has a great solution for this: pass the referrer query parameter containing the UTM tags to the Play Store URL and after installation, the UTM tags will be available. (source: https://developers.google.com/analytics/devguides/collection/android/v4/campaigns)
However, the App store doesn't support this kind of tracking. I'm trying to figure out what the industry standard is for tracking app installs. I've seen the following solution:
Share a URL to your own domain. (e.g. myredirectdomain.com?utm_campaign=test)
Save the client ip, screen resolution and UTM tags in a DB table if the client is an iOS device
Redirect the user to the App Store
Once the user installs the app, the app will send the client ip and screen resolution to your server which checks if those are recently added in the DB.
If so, the corresponding UTM tags are returned and the user's session will be marked with those.
Of course, this will most definitely result in some false positives. I've been trying to figure how other companies do this. I've stumbled upon Google Analytics' implementation which utilizes the iPhones IDFA (source: https://developers.google.com/analytics/solutions/ios-install-tracking). However, the IDFA doesn't seem to be available to the mobile browser.
Do you know what the industry standard is for tracking app install campaigns?
Short answer: there is no industry standard in attribution tracking for iOS. Just google the term "app attribution tracking" and see how many service providers show up. They all use some kind of device fingerprinting and call it their "secret sauce". I've used different services in parallel in the past and results were most of the time very different. (Localytics, Flurry, Tapstream)
The "official" recommended way from Apple is to use their own App Analytics attribution tracking. For that you add a provider token(pt=) and a campaign token (ct=) to your store links. You can get your provider token directly in iTunes Connect. You can nicely combine this with the App Store Affiliate program. The only downside is getting the information out of Apple's App Analytics/iTunes Connect. There are no official APIs to get your hands automatically on the raw data.
Sources:
https://developer.apple.com/app-store/user-acquisition-marketing/
https://developer.apple.com/app-store/app-analytics/
App Store Connect gives you the possibility to create Campaign Link that you can use to track Install. I can't remember when it was release but you can find it in :
App analysis -> Sources -> Campaigns -> Generate Campaign Link.
Of course, this is not a classic UTM to track it in Google Analytics, but it can help
There is a solution for IOS apps to track campaign via Google Analytics.
For IOS you do not need to add UTM parameter but you have to make URL as below:
http://click.google-analytics.com/redirect?
tid=UA-1234-1 // Google Analytics Tracking ID.
&idfa=BBA44F63-E469-42BA-833A-2AC550310CB3 // Identifier for Advertising (IDFA)
&aid=com.bundle.myapp // App ID.
&cs=network // Campaign source.
&cm=cpc // Campaign medium.
&cn=campaign_name // Campaign name.
&url=https%3A//itunes.apple.com/us/app/myApp/id123%3Fmt%3D8 // Redirect URL to iTunes.
For reference please view the link:
https://developers.google.com/analytics/solutions/ios-install-tracking

Conversion of my Project from Youtube data api to dailymotion api.

I have a complete source code of a project using you tube data API v3, when i try to publish my app its continuously rejected due to copyright issue. (i m using someone else channel link),
here is what it says :-
I reviewed your app, and had to reject it because it violates our device and network abuse policy. If you submitted an update, the previous version of your app is still live on Google Play.
Here’s how you can submit your app for another review:
Your app shouldn’t access or use a service or API in a manner that violates its terms of service. For example, make sure your app doesn’t download, monetize, or access YouTube videos in a way that violates the YouTube Terms of Service.
Read through the Device and Network Abuse policy for more details and examples.
now i want to change my code from You tube data API to daily motion API, and i need your help.
Or if someone has any solution how can i get my app approved using someone Else's channel. ?

Ruby: Fetch data from google analytics?

I want to gather google analytics data for daily/monthly report. All visitors, visitors for specific path and conversion rate. Setting for google analytics is already done (I think).
I searched ruby libraries, but many informations are out-of-dated and google api is sometimes update.
Now(2012-09-28) what library is popular? And How to get data? I searched ruby-toolbox, but both two libraries are still active?
Libralies
'garb'
https://github.com/vigetlabs/garb
'google-api-client'
http://code.google.com/p/google-api-ruby-client/
Purpose:
My first step: view data
My second step: edit data(Add note or notation)
thanks,
Google-Api-Client works fine, is an official client and is constantly updated, just check the commit logs and you will see. Note that this API is not for Google Analytics only but for any Google API that uses the Google Discovery API. You should try that.
Regardless of the client that you use make sure it's compatible with the latest version of the API. If it's built using the Google API Discovery service it's a plus because that means the client library will have support for new methods as soon as they are available. It's like an API for building API clients.
GARB on the other hand seems to be abandoned for a while and is probably missing out on several features that came recently.
Note that the Google Analytics API are currently read only. So no client library will support that since there's no API for writing annotations. There's a feature request for that though.

How can google analytics be integrated in a desktop application (MAC)..?

Could anyone help or refer how it can be done..I searched over the net and what i felt is that its only for mobile and websites.
It's for websites. Many of the concepts of web analytics (number of pages viewed for example) don't even make any sense on a desktop app, because they're not organized like a web page.
If you want to use Google analytics data from an analytics account Google provides a data export API.
If you want to track your native application then as Catfish_Man (great name btw!) said, it is not really possible. That isn't totally true, as you could fake it, but the paradigm is so different that you would be better off creating you own solution.
You might want to see this library for GA on desktops
http://code.google.com/p/jgoogleanalytics
Google Analytics doesn't provide a native Mac app integration, but you can use the Measurement Protocol Overview to send raw data to your GA property from your account.
Just create a mobile app property and then start sending raw GA events using HTTP. There are couple Obj-C wrappers available like https://github.com/swisspol/GARawTracker or https://github.com/stephenlind/SimpleCocoaGoogleAnalytics.

Resources