How to setup Google Analytics with Codename One?
I tried using the analytics service, after creating a property and getting an agent string, I added:
AnalyticsService.init("UA-something-here", "property name");
AnalyticsService.setAppsMode(true);
but it did not start tracking. In the Codename One article, it is written that I need agent string and domain string. Are domain and property the same? How do I setup Google Analytics with Codename One?
The agent string is the "UA-......." number, and the domain string is "apppackagename.companyname.com"
Related
We are using Google Analytics 4 (GA4) via Google Tag Manager (GTM), with Cookiebot as the Consent Management Platform (CMP).
Every so often Cookiebot is scanning our site.
In the web server logs, we can see that the user agent contains Cookiebot as per Cookiebot's documentation.
We would like to filter that traffic out from GA4.
The user agent string itself is not recorded in GA4 and I believe that is for privacy reasons.
What I had tried is:
Using a GTM variable, trigger etc., look for Cookiebot in the user agent string (in navigator.userAgent)
Pass that on as a GA4 event parameter and user property
The new property can be used to filter the traffic
That worked well when I mocked my own user agent string to the one used by Cookiebot.
But when the Cookiebot scan actually happened, then this doesn't seem to have worked and I can still see increased GA4 traffic and no indication of Cookiebot in my event parameter or user property.
How can I filter out Cookiebot web traffic from GA4?
I have a flutter app using firebase and google analytics. My data about active users is wrong as I am testing a lot in emulators and google analytics thinks that the installs there are real users. As I often reinstall the app for testing it somehow seems to count it as a new user every time.
As a solution, I'd like to disable google analytics when building the app in debug mode and only activate it when I build it with --release.
Does anyone know how do achieve this with a flutter app?
I assume you're using Firebase Analytics in Flutter (I don't think there's GA for Flutter). You can use kReleaseMode flag when setting navigatorObservers of MaterialApp and creating FirebaseAnalyticsObserver instance. Here's how I do it in my app (notice that I also use preferences which allow user to turn on/off analytics, as well as desktop platforms where there's no Firebase support which is why I specifically check for Web, iOS and Android platforms):
MaterialApp(
...
navigatorObservers: preferences.isAnalyticsEnabled &&
kReleaseMode &&
(kIsWeb || Platform.isAndroid || Platform.isIOS)
? [
FirebaseAnalyticsObserver(analytics: FirebaseAnalytics()),
]
: [],
...
Maybe not what you are looking for, but you can remove all the ip-addresses of your debug devices from getting tracked in Google Analytics.
UPDATE: the original answer was for Universal Analytics only. Updated the answer to also include Google Analytics 4 properties.
For the old Universal Analytics properties, the instructions according to this page are:
Exclude Your IP Address From Google Analytics
Login to Google Analytics and select your profile
Select the Admin menu
Under Account select All Filters
Click Add Filter
Give the filter a name (can be anything, I use the IP address)
Leave Filter Type as predefined
It should read: Exclude + traffic from the IP addresses + that are equal to
Enter your IP address
For the new Google Analytics 4 properties, you can filter out "internal traffic" by following the instructions on this page:
In Admin, click Data Streams in the Property column.
Click Web and then click a web data stream.
In the web stream details, click Configure tag settings (at the bottom).
Click Define internal traffic.
Click Create.
Enter a name for the rule.
traffic_type is the only event parameter for which you can define a value. internal is the default value, but you can enter a new value (e.g., emea_headquarters) to represent a location from which internal traffic originates.
Under IP address > Match type, select one of the operators (e.g., IP address equals).
Under IP address, enter an address or range of addresses that identify traffic from the location you identified in Step 8. You can enter IPv4 or IPv6 addresses.
Click Create
Note: before step 4 you might need to first click on "Show more" to see the "Define internal traffic" button.
Check this out from another answer. To disable the collection of data by Firebase Analytics in your app, see the instructions here.
In summary, to disable temporarily, set FIREBASE_ANALYTICS_COLLECTION_ENABLED to NO in the GoogleServices-Info.plist file. To disable permanently, set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED to YES in the same plist file.
https://stackoverflow.com/questions/37518212/how-to-disable-remove-firebaseanalytics#:~:text=To%20disable%20the%20collection%20of,in%20the%20same%20plist%20file.
Google's marketing platform has a feature called 'Google Signals' that makes it possible to track users across devices. This is possible on Chrome browsers where users have logged chrome into their google accounts (which happens by default if the user logs into a google service).
My question: when the google analytics tracker beacons tracking data back to google, which query string parameter contains the 'cross-device user id'?
Here's what the query string parameters look like:
Google Signals will only provide you with data on users with ad personalization turned on in their Google account settings.
The parameters you've referenced is for the measurement protocol, which is the foundation for all the different GA implementations (GTM, gtag.js, analytics.js).
I think all the matching is done server-side by Google and possibly a combination of fingerprinting all the devices the google account has signed in with and activity on those accounts, maybe even a pool of GA client IDs & properties.
I am new to Google Analytics and I am trying to retrieve Google Analytics data using Pentaho Data Integration (CE 6.0) by following Pentaho Google Analytics
It says I need to create a service account to get the data. On the google developer console I at location Google API manager --> Credentials --> Create service account
Now when I try to create a new service account, it by default assigns XXXXX#YYYY.iam.gserviceaccount.com
Instead of this I must have XXXXX#developer.gserviceaccount.com
Can someone please share any insight on how to get XXXXX#developer.gserviceaccount.com as a service account email?
The old format for service accounts was
XXXXX#developer.gserviceaccount.com
the new format for service accounts appears to be
XXXXX#{projectId}.iam.gserviceaccount.com
you will probably not be able to create one with the old format just go with the new format
I am just trying the google Calendar API explorer and I am sure I have the right calendarId and I am sure the ruleId is my username that has access, but I always get the "Invalid Resource Id", and since I am just playing with the explorer I can't even add my own resource Id as many suggestions.
I posted the explorer below:
https://developers.google.com/apis-explorer/#s/calendar/v3/calendar.acl.get
The id is not just the calendar email (it always contains a prefix of the user kind). Try doing a list of acls first:
https://developers.google.com/apis-explorer/#s/calendar/v3/calendar.acl.list?calendarId=primary&_h=1&