Bigquery - (GA4 data) - why the number of user ID's do not match Unique Users Metrics? - google-bigquery

I do have my GA4 property connected to Bigquery. I use my own user_id for tracking - its available once someone logs into my app.
For some reason, when I'm trying to build a report User ID string vs Unique Users, some ID's have more than 1 Unique User reported. Showing an example on the attached image.
Why is that and how I can fix that situation? I'd expect that one ID = One User
User ID vs Number of Users

Related

How to use loop to find related object using Pentaho Data Integration

I want to identify the bad/invalid records so that i can add in a separate SQL Table. For example, we have an account object. And i want to find bad accounts. But i need to apply some filters on contact object. If conditions satisfy based on contact then i want to inserts those invalid account records in SQL Table.
I don't want to directly query from contact. I want to query using account but conditions should be used from contact.
Do anyone knows what is the best way to perform loop in Pentaho? Check each record for contact , if all contact's condition satisfy then add Account id in table. If one of the contact record doesn't satisfy condition. The relevant account should not be added in SQL Table
For Example:
On Account "A" we have 10 contacts
if the email field is empty on all 10 contacts then add Account in SQL table(As bad data)
if on two of contact rcords has email field populated but 8 of them are blank then Account id shouldn't be added in SQL table
How we can better implement this scenario using Pentaho? Any help matters
Thanks
So you can create a transformation similar to this:
You have a query with the different account contacts
Order the query data by account
Group the information by accounts and calculate the maximum ContactMail (so if all mails in contacts are null, the max will be a null, is the result of that step is shown in the Preview data part of my screenshot)
Filter rows by MaxContactMail IS NOT NULL
These could be the basic steps, you'll need to add more steps or perform more than one transformation depending on the complexity of your data.

Firebase / Google Analytics

I am using firebase sdk with Expo. In order to link users accross sessions and different devices we use the following setUserId(user._id).
This occurs after a user logs in and authenticates.
On logout I call setUserId(null).
My questions is: does setting the user id to null erase the previous user tracking data from GA. Should I be setting to null at logout? I can't find any concrete documentation on how setting to null impacts the data collection.
The goal is to track unique users across months, years etc. Is the above configured correctly or is there some issue with setting to null on logout.
You can remove the User ID by setting it to null or replace it with a new user ID. userID is just a user property that goes with all events after it is set so you need to set it to null when user logs out and set a new user ID when a different user logs in.
From documentation:
The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property.
https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#setUserId(java.lang.String)

API to retrieve subscribers with statistics from journey in Marketing Cloud (former ExactTarget)

We have following task:
In the Marketing Cloud there are few journeys created by Journey Builder. They all are assigned to different Data Extensions via Event Source.
I'm going to receive all Data Extension rows that participate in specific Journey. Also we need to retrieve basic statistics by participants that shows us actual status of participant (data extension row in journey) like: what is the current place in journey for participant (received first email, received sms in line after first email etc.).
To retrieve all participants I suspect we have to use:
GET /interaction/v1/eventDefinitions/{eventDefinitionId}
where eventDefinitionId is Id from
GET /interaction/v1/interactions/{journeyId}
please correct me if I'm wrong.
The question is if there is some API that allows to retrieve statistic data described below.
Thanks,
Roman

Does surveymonkey api return the unique ID associated with their unique id specifications?

Can anyone tell me if they are know for certain whether or not survey monkey's api has the ability to return the unique ID associated with their designated unique id specifications:
http://help.surveymonkey.com/articles/en_US/kb/Can-I-track-respondents-using-a-unique-ID
It states the following regarding viewing this in the aforementioned link:
When these results come back on the survey, that custom ID of "00001"
appears in the Custom Value field in the Analyze > Browse Responses
section.
However I cannot find any mention of this data being returned from their API in the API documentation:
https://developer.surveymonkey.com
It can be retrieved by sending 'custom_id' as a requested field to 'get_respondent_list':
https://developer.surveymonkey.com/mashery/get_respondent_list
It will then be in the 'custom_id' field in the respondent's dictionary.

MySQL joins for friend feed

I'm currently logging all actions of users and want to display their actions for the people following them to see - kind of like Facebook does it for friends.
I'm logging all these actions in a table with the following structure:
id - PK
userid - id of the user whose action gets logged
actiondate - when the action happened
actiontypeid - id of the type of action (actiontypes stored in a different table - i.e. following other users, writing on people's profiles, creating new content, commenting on existing content, etc.)
objectid - id of the object they just created (i.e. comment id)
onobjectid - id of the object they did the action to (i.e. id of the content that they commented on)
Now the problem is there are several types of actions that get logged (actiontypeid).
What would be the best way of retrieving the data to display to the user?
The easiest way out would be gabbing the people the user follows dataset and then just go from there and grab all other info from the other tables (i.e. the names of the users the people you're following just started following, names of the user profiles they wrote on, etc.). This however would create a a huge amount of small queries and trips to the database in a while loop. Not a good idea.
I could use joins to retrieve everything in one massive data set, but how would I know where to grab the data from in just one query? - there's different types of actions that require me to look into several different tables to retrieve data, based on the actiontypeid...
i.e. To get User X is now following User Y I'd have to get my data (User Y's username) from the followers table, whereas User X commented on content Y would need me to look in the content table to get the content's title and URL.
Any tips are welcome, thanks!
Consider creating several views for different actiontypeids. Union them to have one full history.