Use of google Analytics SDK 3.09 needs to check Advertising Identifier(IDFA) in iTunes Connect? - google-analytics

I used Google Analytics SDK 3.09 in my app and wants to submit the app to appstore but am bit confused whether i need to check Advertising Identifier(IDFA) and its subsequent options for serving ads and more. Am not showing any ads in app just using GAITracker to track the home screen do i still need to check IDFA? Please guide me more on this i googled but did not get great help on this.

IDFA is disabled by default. If you need IDFA (for example for campaign tracking of installs), you need to link appropriate files and then enable it explicitly, like so:
// Enable IDFA collection.
tracker.allowIDFACollection = YES;
See GA documentation for more details
So, by default, there's no need to mention that your app uses IDFA.

You are using Google Analytics to track conversions for your app.IDFA (Identifier for Advertisers) requires for 'libAdIdAccess.a' and 'AdSupport.framework. So check the 2nd & 3rd option in IDFA -> "Attribute this app installation to a previously served ad". AND "Attribute an action taken within this app to a previously served advertisement".

Related

Firebase Remote Config - Conditions not applied

I am using the Firebase Web SDK 8.3.1 and I have created a remote config parameter with conditions based on a custom user properties.
The problem I encounter is that my end users always get the default value, never one from any of the conditions, even if I am sure the user actually matches the conditions...
I see in the doc:
Warning: To use audiences and user properties with Remote Config, you
must enable Google Analytics data sharing for your project. In your
app, you'll need to ensure Firebase Analytics is present and data
collection is available as well.
Then if I follow the provided link I see the instructions:
To manage Google Analytics for Firebase data sharing:
Sign in to Firebase and select a project.
Click the Settings icon and select Project Settings.
On the Project Settings page, click Data privacy.
See the options available under Google Analytics data
sharing. When you share Analytics data, you share it for all the apps
in your project.
Turn on the switch for Share Analytics data with all Firebase
features, including Predictions, A/B Testing, Remote Config, and
Notifications (this is your default setting) to enable all current
options to share data with Firebase features.
But in my firebase console I dont have this switch! Under "Google Analytics data sharing" there is now another link:
So I cant turn on this setting :(
Note: how I made sure my user actually matches the condition "user property X == A":
Wait 30mins
Launch the app with a user having user property X set to A
Launch the Realtime dashboard of Firebase Analytics and filter to the last 30mins
And here I see that there were indeed 1 user in the last 30mins and this user had property X set to A
So is there anything special I should do when I want to create a condition using custom user properties?

How can you prevent fake events in firebase analytics

I've recently set up Firebase Analytics with my website. I was beginning to add some events to be logged and realized any arbitrary event could artificially be called. I could just go into my browser's console and run the command firebase.analytics().logEvent('some_fake_event').
If you know a website is using firebase analytics, what's to stop you from simply spamming fake events into your console? The website owner's analytics would become fairly screwed up. Also, firebase mentions that there's a 500 event-type limit. One could also run firebase.analytics().logEvent('fake_event_1'), firebase.analytics().logEvent('fake_event_2'), etc. Oops, the website owner can't create any more new (legitimate) event types.
What is in place to prevent this?
The logEvent method will be available once you rely on standard firebase SDK. The only way to prevent this would be to obfuscate the library you're using.

Google Analytics opt out for mobile devices such as iPhone?

Is there a way to implement google analytics opt out extension on a mobile browser? I am developing a site and it requires checking the site out on mobile. How do I stop the google analytics code that is in my site from picking up these views?
The question is not fully clear - do you have problem with some part of code responsible for Google Analytics service? Or you just want to exclude your testing visits. In other words you don't want to clutter Google Analytics reports with your data (testing visits etc.).
If this second case is a sense of your question, then the easiest way is to create a filter (based on your network IP) in Google Analytics.
To create a filter, please:
1/ Login to Google Analytics
2/ Go to the ADMIN section
3/ In Account column, please enter "All Filters"
4/ Click red button Add filter
5/ Use predefined filter > exclude > traffic from IP adresses
If this is not the answer which you expect, please give more details :)
In your backend, which generates your site (HTML), you should detect using User-Agent if the client is in fact a mobile device and do not add Google Analytics (or GTM) script to the page.

Avoiding Google Tag Manager blocking by AdBlockers

I have used Amplitude analytics in the past in my react Web app to send event data. However I just started with Google Tag Manager and noticed it does not run because being blocked by adBlockers. Amplitude was always functional because I loaded their Javascript SDK through NPM install 'github:amplitude/Amplitude-Javascript' and initialized it at app load with client API key. I like the approach of Google Tag manager where I dont have redeploy app to make changes to my analytics logic. How can I take a similar approach to avoiding being blocked by adblockers.
It may very well be that Google products are popular so Adblock specifically just block google analytics products not other analytics products.
You don't. If people don't want to be tracked, that is their decision. You should not be forcing people to provide you with any data they do not want to provide. Especially by using some shady "bypassing" measures. Instead-
You could use a cookie to permanently disable your tracking of those who do not wish to be tracked, to help you preserve reliable analytics. See: http://www.multiminds.eu/2016/05/19/how-to-disable-tracking-via-google-tag-manager/
Or, better yet, simply measure the percentage of visitors who have disabled tracking so your analytical data can remain accurate. See: https://marthijnhoiting.com/detect-if-someone-is-blocking-google-analytics-or-google-tag-manager/
Yes, it's possible.
You can use reverse proxy for Google Tag Manager.
First, download the Google Analytics JavaScript library itself and host it on your server.
Then alter the code in the downloaded library to change the target host from www.google-analytics.com to your own domain name using find-replace.
Replace the link from the default Google Analytics script in your codebase to modified one.
Create a proxy endpoint to Google Analytics servers on your back end. One important step here is to additionally detect the client’s IP address and write it explicitly in requests to Google Analytics servers to preserve correct location detection.
Test the results. You’re done!
more detail info on freecodecamp.org/news/save-your-analytics-from-content-blockers and https://analytics-bypassing-adblockers.netlify.com
There's dataunlocker.com as well as some other open source alternatives (1, 2) which can help to fix reporting accuracy of Google Tag Manager, Amplitude, Google Analytics etc.
Talking about ethics and privacy, tools like DataUnlocker are just tools which allow you to bypass ad blockers as if you have implemented server-side analytics. I think by correctly implementing that "we use cookies" consent one can solve any privacy concerns.
I've managed to get around some blockers with the following in a node app:
var request = require('request');
app.get('/proxy*', function(req,res) {
const newurl = req.url.split('/proxy/')[1];
const data = request(newurl);
//data.on('response', function(response){console.log(JSON.stringify(response))});
data.pipe(res);
});
Then in your snippets for GTM prepend: "/proxy/" in the url and now the call goes via your server.
The caveat with the above is that without additional code you can't preview the container, but the container does load correctly. Lack of preview is a different issue to deal with.

Google Analytics sandbox

I have some problems with the google analytics not working on production, I have made some fixes and used some plugins to check that the information sent to google is ok, but the problem is I cannot test properly on my sandbox since I do not have the credentials for the analytics account used on production instance. I will not have access to that account and I do not want to create a dummy account linked to my sandbox because I cannot have my sandbox address indexed by google. Is there any way to install a local server that emulates GA? Or a way to create a GA account and prevent it from indexing my sandbox address? I have found the urchin software that would have given me the possibility to install a local sandbox, but this was discontinued by google and I was not able to find it anywhere.
If by "indexing" you mean "becoming a part of the Google search index an appearing in result pages", that is not in any way related to analytics. If you have a problem that your pages Urls show up in GA (which really is the whole point of Analytics) you can programmatically pass dummy urls to the tracker:
ga('send', {
'hitType': 'pageview',
'page': '/home' // pass a virtual adress here per page
});
That way your sites structure will not be recognizable in GA (however this will make testing more difficult).
If at all possible you should have Google Tag Manager installed on the live page. GTM has a preview mode that allows you to directly in the live site without affecting other users (tags are only visible to visitors with the preview cookie).
As for emulating locally, no, not really. If you still use asynchronous tracking (ga.js) you can use setlocalGifPath and _setLocalServerMode to have the tracking data send to your own server, but that will not give you the interface - it just means you can create a log file with the google parameters that you have to parse yourself.
Universal Analytics does not (to my knowledge) have corresponding methods (they are a remnant from urchin days when people wanted to reprocess their data locally. As you've said urchin is now defunct and it would have been too expensive for a bit of local testing in any case).

Resources