We couldn't find any code on Google Analytics Developers about how to enable Advertising Features for acccountId. Is it possible to make such request using API? If this isn't possible then gapi.client.analytics.management.remarketingAudience.insert({ seems pretty useless because you still need to do it manually. Any solution?
The API you mentioned is to create an audience segment.
You can't enable advertising features with API. You can enable it in Google Analytics interface or modifying code (in page or in GTM).
Related
Google Analytics 4 allows new custom audiences to be created:
I want to do this programmatically through a web API, but I can't see any documentation. Is it possible to create audiences in Google Analytics 4 using an API?
Google have confirmed that "the creation of audiences is not yet supported in Admin API" and have raised a feature request. They've not given a timeline for implementation but suggested following the Google Analytics API Notify group for future updates.
I need to remember that even after this feature is implemented in the GA Admin grpc API, it will also need to be supported in the .NET client library that I'm using, so there will take some additional time.
Not sure when added, but...
Web API:
https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.audiences/create
.NET client:
https://googleapis.dev/dotnet/Google.Analytics.Admin.V1Alpha/latest/api/Google.Analytics.Admin.V1Alpha.AnalyticsAdminService.AnalyticsAdminServiceClient.html#Google_Analytics_Admin_V1Alpha_AnalyticsAdminService_AnalyticsAdminServiceClient_CreateAudience_Google_Analytics_Admin_V1Alpha_CreateAudienceRequest_Grpc_Core_CallOptions_
Today we use Google Analytics Reporting API V3 (core reporting API v3 using java SDK google-api-services-analytics-v3-revxxxx.jar) in our system to connect and get data from Google Analytics. For this, we need properties that are based on Universal Analytics (UA-xxxx). We use the service account approach for connecting to Google Analytics and fetching data.
From looking at the information available at https://developers.google.com/analytics/devguides/reporting it seems that we cannot use the v3 API with the new GA4 properties and we would have to use Data API V1. Is this correct? Any information around this would be helpful.
Yes, the data model of GA4 is completely different from that of Universal Analytics for which dedicated APIs are required.
To date, GA4 is still young and constantly evolving so many new improvements and features will come out in the near short future also from a programmatic point of view.
Anyway you can still create a Universal Analytics Property by 'show more option' button when you create a new one.
Currently, we have implemented Google Analytics for AppleTV (tvOS) via Measurement Protocol i.e. using batch end point Google Analytics - Measurement Protocol. Now, Google Analytics is sunsetting. Alternative as suggested by Google is Google Analytics for Firebase. But, that implementation is for Mobile Platform.
Does anybody know any workaround that I can use on Firebase Platform in order to report analytics from tvOS using some sort of Firebase API?
unfortunately, there is no good news about Firebase Analytics support for tvOS. They don't plan to support it in the near future. Although, there is a community works which make some of Firebase services available for tvOS, you can take a look here: https://github.com/firebase/firebase-ios-sdk#community-supported-efforts.
I want to add Google analytics manually on each pages and events in my website. Is there any ways to add Google analytics using REST api or any library in PHP. so i can track specific events of my website.
There is no REST API for Google Analytics. You will have to use one of the available libraries provided by Google.
To track particular events, you can use tag manager or simply use custom dimensions.
TL;DR, Google Analytics is great if all you ever use is their GUI dashboard. If you need API access, go with another service.
If you need to access analytics data programmatically, especially if you are using NodeJS, I suggest you use some other service besides Google. Their documentation is incredibly lacking, they try to pigeon-hole you into using a client library rather than steering you in the direction of a REST API, and authenticating is a nightmare. The new v4 API purportedly consists of a single endpoint that you need to query with a complex combination of HTTP body and query params. Again, documentation is nearly non-existent.
I have a small API written in node.js that has no website attached, it works only on AJAX calls. I want to know if it is possible to use Google Analytics, or other good Analytics tool to monitor traffic.
I think it depends on how you have things set up but I wonder if you couldn't just add the normal JavaScript tracking to your API since its JavaScript as well. In the event you cant do that you should check out the Measurement Protocol Overview, it will allow you to send the raw data to Google Analytics yourself.