Managing multiple apps with one Google Analytics account? - iphone

I've just setup a Google Analytics for Mobile Apps account and I've implemented the SDK in my iPhone app with no trouble at all. However, I haven't figured out how to manage multiple apps with one account. It seems fairly easy to setup multiple subdomains when dealing with websites and I've noticed the javascript code has a setSubdomain function that doesn't seem to be present in the iPhone SDK.
Is there any way I can have google analytics differentiate my different apps for the same account?

Set up more profiles in GA - one profile per app. You should end up with UA codes like UA-XXXXX-1 and UA-XXXXX-2 - the XXXXX is the account identifier, and the suffix is the 'web property identifier' - in this case each app will have it's own property identifier. They don't match up 1-to-1 to GA profiles, as you can have more than one profile for a web-property-identifier (so you can have profiles with different filters on the same data), but in your case I'd suggest a separate web property IDs for each application.

So the docs say:
To use the SDK, you must create a free
account at www.google.com/analytics,
and create a new website profile in
that account using a fake but
descriptive website URL (e.g.
http://mymobileapp.mywebsite.com).
Once you create the profile, write
down or keep a copy of the web
property ID that is generated for the
newly-created profile. A Web property
ID is also known as the UA number of
your tracking code and looks like
UA-xxxxx-yy, where the x's and y's
indicate the unique numbers for your
profile. You must indicate the web
property ID you'd like to use when
instantiating the tracking object. See
Web Property for more information.
Appears to me you simply setup that "fake website" such as http://myapp1.yourwebsite.com and then you'll get a new UA- number which you plug into the code within myapp1.
App2 will have a different UA- number you use.

Related

Sign-in with Apple from device using NextAuth.js

When using the Apple provider with NextAuth.js on the web server and signing in on a native device app (written in Swift using ASAuthorizationAppleIDButton and ASAuthorizationAppleIDProvider) using Sign In With Apple, how do you add a new user and account to the NextAuth.js database tables?
Besides signing into the iOS app, the user also needs to be able to sign into a website with Sign In With Apple and link his user account to other OAuth providers like Google (e.g. if signing in on Android). This question focuses on just Sign In With Apple on an iOS device and how to record that account info so that it plays nicely with sign-ins on other platforms.
Does NextAuth.js have a REST API that the iOS device can call to do this? Otherwise, if custom code on the Next.js server is needed to add the rows manually, is there documentation on what goes into each of the columns in NextAuth.js user and account tables?
if you just setup the AppleProvider, NextAuth.js won't keep a database of your users.
It lets Apple handle that and then just gets a signed message back saying, im paraphrasing, "Yup, thats Edward, and here are some more details about him.." and includes some basic info like your email address, profile picture URL, etc.
This is the basics of their OAuth-only strategy.
If you'd like to persist user data yourself and maybe add additional fields to the ones Apple returns to you, you'll have to setup an adapter. An adapter in NextAuth.js world is just a database where it will automatically save any new users and check against for existing users.
You can see the details of the various available adapters, including the default model/schema here: https://next-auth.js.org/adapters/models

What is the difference of internalWebPropertyId, defaultProfileId and profileId in a Google Analytics account?

I am playing with Google Analytics API and found that it's really complicated.
A GA user can have more than one accounts.
Each accounts can have more than one Web Properties
Each Property can have "internalWebPropertyId", "defaultProfileId" and ordinary profile id.
I might have already made some mistakes by listing them out.
Is there any tutorial/manual that I can read to understand the whole structure better?
Thanks!
A user can have access to more then one Google Analytics accounts -> Each account can have one or more Web Propertys -> each Web property can have one or more Views (profiles)
Don't rely to much on DefaultProfileid its not set for every webProperty and I haven't been able to find any documentation as to how that's set.
You can read a little about it here: Accounts and Views (Profiles) as well as What Is The Management API - Overview
I just found this in answer:
https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles?oauth_token={Token}
There should be away of working that to make one request for accounts, one to get all the Web Properties , then one to get all the Profiles.

Automate distribution of redemption codes for Custom B2B app

I have built a Custom B2B app for one of our clients. My question is how to automate the distribution of the redemption codes.
I have already looked at some of the MDM providers. Their solutions are too expensive and all we really need is a way to distribute the app from a webserver, not manage a bunch of mobile devices.
As you probably already know, when a client buys a Custom B2B app through the Apple VPP program, they get a spreadsheet with valid redemption codes for the number of licenses they have built. This spreadsheet has 2 columns: 1) redemption code 2) URL to redeem the code
I want to provide my client with a URL where they can send their users to download the app. They just don't have the expertise/infrastructure to distribute the app themselves. And emailing clients is not going to work.
I'm not a web guy, but it seems to me that we could write a webpage that would look at the spreadsheet for the next available activation code and then redirect the user to the associated URL. I'm not concerned with the number of licenses they distribute since I have another way of auditing the real number of users (Flurry). So I want this to be as painless as possible.
In fact, I have multiple clients and want to provide them each with their own URL for their clients. It seems like this shouldn't be too difficult to code.
The problem is, I'm not the guy to write that code. Any ideas on how best to do this?
Assuming that you don't want to show the user a website you should be able to do this with an online service like parse.com and the features it offers.
From a user POV you would supply them with a link which directed them to parse.com with a path and parameters indicating the action to be taken (get app) and what account is associated. This would redirect the users browser to the appropriate destination.
The main issue (and this applies to any solution) is knowing if the user actually followed through and used the code. i.e. should it be removed from the DB so it isn't offered to another user in future. Then you would update the DB each time you get a new spreadsheet.
Anyway, this could be achieved with a little javascript in parse.com, specifically, by using cloud code which can interrogate and modify the DB and then redirect the user.
Obviously if you need user authentication of some kind or other restrictions then you would need to start adding some web interface on top of this in order to collect the details.

How to create a Non US App profile when creating app through intuit developer IPP

When we specify a domain with a country suffix such as .au (domain.com.au) the input when creating the app profile (MyApps/Create New App) is rejected. However if we specify a domain with just .com as the suffix then it works fine. Is there a way around this? like a workaround? Does the app profile need to be accurate from the start or can we change it later?
App profile doesn't need to be accurate from start. In the development env, you can use dummy URL(like localhost.com).

Sharing app-IDs among multiple developer account

I have an apple developer account using which I have developed an application for one of my clients. Now, the client also has a developer account. Is there anyway, I can create an app ID like com.client.* in the clients developer account and then upload an application's release version using an appID like com.mycompany.applicationname which is created in my developer account.
Or else, there is no option like that??
An app ID is a unique application identifier. Even the exact same source code, built with two different app ID's, would be considered two completely different applications.
In order for you to compile your client's application, you will need to get a copy of their profile using com.client.* and compile the application as com.client.appname.
That would be possible, (as far as I know, apple doesn't check the AppIDs if they are used anywhere yet outside of your program) but might get problems when submitting to the appstore and furthermore, you could not submit with his account, what he probably wants. Here's what we usually do:
1. Create a *. Provising profile for yourself for development purposese.
3. For push notifications, you should be able to create a DEV certfiicate with Appid com.client.appname in your developer program
4. Have your customer invite you into his Program and create the matching provising profile for appstore submission and push notification with this Appid.
You can be in multiple development programs (I'm currently in three different ones..)