how to see value of distinct_id in Mixpanel - mixpanel

How can I see value of distinct_id in Segmentation?
Also the mixpanel graph is showing all the events and not just the unique ones by distinct_id.

Related

Showing a default Distinct ID in Mixpanel instead of Mixpanel's own arbitrary choice

In Mixpanel, Users can have multiple Distinct IDs that can be merged under 1 identity. The User is identified with a default Distinct ID, which we’ve noticed is the first one created, not the most recent or one that we would explicitly prefer as the default.
Is it possible to set a default/primary Distinct ID?
Also related, once a user signs up, we are using email address as the Distinct ID. If the user changes their email address, would we need to create an alias (we have Identity Merge enabled, FYI), or update the Distinct ID with their new email?
I did read on this support article titled "Moving to Identity Merge" that:
You can no longer control the canonical id for users in Mixpanel
The ID merge system will now determine which distinct_id is used as the canonical id for a user in Mixpanel. Any merged id can be used to query for information about a user with our APIs, but the results of the query may return a with different canonical distinct_id value than the one used in the query.
I had a similar issue, we use a server-side implementation but this should apply to client side as well, my flow was:
send some anonymous track() events with anon_id & distinct_id uuidv4. Let's say the anon_id is: abc-123
authenticate user (now we have access to user_id)
call identify() with user_id and anon_id
send some track() events with our internal user_id as the distinct_id. For example the user_id is: 1001
We noticed that the default mixpanel canonical distinct_id would always be abc-123, not 1001 like we wanted.
After playing around with the mixpanel API I have discovered that if you create the user profile before identifying, the problem seems to be fixed.
mixpanel.people.set(distinct_id, props);
mixpanel.identify(); // our api is identify(user_id, anon_id)
Going through he flow again, the canonical distinct_id is now 1001 instead of abc-123. I believe this fixes it because creating a profile for the user sets the canonical distinct_id (no source on this though).
To be clear, the flow afterwards is:
send some anonymous track() events with anon_id & distinct_id uuidv4: abc-123
authenticate user
call mixpanel.people.set(distinct_id, props) // distinct_id = user_id
call identify() with user_id and anon_id
send some track() events with our internal user_id: 1001
Then 1001 should be the default canonical distinct_id instead of abc-123.

Can anyone clarify the Event handler execution from a field defaulting to row persisted or refer me to a source link

I would like to know how each event handler works and when it triggers.
And also which event is best to populate the customized Unbound field.
I have been using Rowselected event for Unbound field.
According to some sources, Rowselected is used only for the UI controls.
So, In which event I should use to calculate and populate the Unbound field with out using PXFormula like Attributes
This should get you started.
Working with Events
See the sequence of entries from the link above for more detail on the order of events. For example here is the image from Sequence of Events: Update of a Data Record:
For unbound fields you should use the PXUnboundFormulaAttribute or the FieldSelecting or RowSelecting events for calculated values.

Square Connect API Chargebacks/Disputes

If a merchant experiences a dispute / chargeback, where does that appear in the Square Connect API? As a refund? As a negative payment? Is there another endpoint specifically for this event?
Thanks for pointing out this gap in the documentation. I've updated this answer with the definitive settlement entry type.
Events like chargebacks are reflected in the entries of Settlement objects returned by the List and Retrieve Settlement endpoints. All chargeback-related settlement entries have the type HOLD_ADJUSTMENT. These entries can indicate the placing of a hold on disputed funds, or the subsequent release of a hold if a chargeback is won by the merchant.
Chargebacks are not reflected in payment- or refund-related endpoints.

Facebook graph api Events and Venue Information, sometimes it only returns venue id when the event was created in a known venue

I'm creating an app in Titanium that uses the Facebook Graph API to get all the users events, however, the venue information, it only brought to me, after I was very specific about the field, and some times, a lot of the times, when the Event was created in a known location, it only brings the venue_id, and when I query the venue(via http://graph.facebook.com), then it gives me the venue location details, more importantly, the latitude and longitude of the thing.
Is it possible to bring the information of the venue in the same response?
Also, it only brings the events that the user is attending, is there any way to show the events recommended to him also?
Ti.Facebook.requestWithGraphPath('me/events?limit=5000&fields=id,owner,name,description,start_time,end_time,location,venue,privacy,updated_time', {}, 'GET', function(e) {
obj = JSON.parse(e.result);
Ti.API.info('Events: '+JSON.stringify(obj));
}}); // Facebook Events
Also, it only brings the events that the user is attending, is there any way to show the events recommended to him also?
Not sure what exactly you mean by “recommended” … if you mean events the user has been invited to, then you can query the FQL event_member table with the user id.
You can kind of “join” the info from the table above with the event table by selecting from that using WHERE eid IN (SELECT … FROM event_member WHERE …)
Is it possible to bring the information of the venue in the same response?
Using a multi-query you can do it, similar to as it is described here: FQL: query for event table returns venue.name instead of venue.id

Fetch Facebook Event using location

I am able to fetch user event but i require to fetch event using location wise like event in usa , uk , india.
How can fetch event location or b/w date range in Facebook
Way #1: Graph API using the event object From: http://developers.facebook.com/docs/reference/api/event/
When you call the graph API using https://graph.facebook.com/{EventId}?fields=location you should get back a location if it was specified by the event admin. You can then try to see if that location is in the area you're looking for. If not, then move onto the next one.
Way #2: Graph API using the event fql table From: http://developers.facebook.com/docs/reference/fql/event/
When you call the graph API using https://graph.facebook.com/fql?q=SELECT name, location FROM event WHERE eid={EventId} you will also get back the event and location. If you want to be tricky and get a listing of all events for an authenticated user, then you can do FQL such as SELECT name, location FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid=me())

Resources