Query regarding response of Mixpanel.track event - mixpanel

Suppose I have different cards, or section in a page with “like” button on every card. On clicking this card, a Mixpanel “like” event is fired with some custom properties – Button Name, Card/Section name etc.
Question –
Now if I want to show the count of “like” on every card, in real – time, how can we do that. An example is – if the user clicks like on a card, the count of like for the card will increment without refreshing the page. Will it be possible to get the response of “mixpanel.track” event and in response fetch the count of “like” event and display below every card.
Currently I am using below mentioned API URL which is returning list of all entries for the specified event and property.
URL – https://mixpanel.com/api/2.0/events/properties/?name=Name of property&event=Name of Event&type=general&unit=month"

you can use the callback in mixpanel.track
https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.track
One more thing you should do is use mixpanel.increment so like count gets stored in mixpanel as well
https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.people.increment
Hope this helps,
Che

Related

How to tell which page a user was on when they fired the first of an event type in Google Analytics

I want to see what page on the site my users were on when they fired the first event action: add to cart, effectively starting their shopping journey within that session. I'm in Google Analytics, but completely stumped how to combine the pageviews and event action to pinpoint that this was the page the user was on the first time the user fired that event in their session (assuming Unique Event could be a metric used?).
Would love some ideas and help! Thank you!!
From the Events report you can't deduce when a user clicked for the first time on an element. The data is aggregated.
You could do it for example by sending a custom dimension at the time of the click on your element and assigning a cookie that checks if that information has already been sent to Analytics. If the cookie exists, don't send that dimension anymore.
It is not a 100% reliable method but it allows you to get the information you want for the future.

Google Tag manager: get the amount of time (minutes/seconds) it takes to complete progress

I have an issue with tracking the completion of a progress within a web application. I want to track the amount of time it take for a user to finish a process (let's say he fills in an form, get's a confirmation and accepts the term/confirmation).
The process takes place in three different pages.
These are the three pseudo pages:
Page 1: Form
Page 2: Confirmation
Virtual pageview: Registration completed
The Virtual pageview is being made when the user has pressed the submit button and there are no errors on the screen.
What I would like to know now is:
How to track the amount of time (seconds/minutes) it took the user to complete the registration? (in GTM)
You can use custom HTML in GTM just start a timer when the user is on the first page and start filling the form on page unload save the time in a cookie.
At the last page when the registration is complete send an event with the cookie value containing the total time taken by the user in event value. Later you can analyze the average time.

Time of stay on webpage

I want to know the time a user spends to fill a particular field in the page and want to trigger an event if the user spends more than 5 minutes to answer a question on that page.
I've looking at various Web Analytical tools like Crazyegg, Lucky Orange. Google Analytics for my website and i did not find any of them have this feature.
Is there any way that i can get this feature in my website.
I've been researching to get the perfect fit but in vain.
Any advice would help.
Thank you.
With the help of the Google Tag Manager you should be able to do this with Google Analytics:
Add a Datalayer to your page, which fires if a User starts filling your form/field.
Build a Event, Listening on this Datalayer and send a Timestep (for example: Category = Form, Action = Start, Label = {{Timestamp}}) Now you know then a User started interacting with your form.
Build a second Datalayer, fireing when the User sends your form. Build a Event for this and send your second Timestamp to GA (for example: Category = Form, Action = End, Label = {{Timestamp}}) - now you know how long a user needs for your form.
Trigger the Event
Here we can use the same Datalayer, we used with the Event-Tracking.
Build a Triger for your Event, listening on the Datalayer and then starts a Countdown (Timer-Trigger in GTM)
In the Timer-Trigger rules you have to specify, that the Trigger should not fire if the second Datalayer (Datalayer-End) fired allready.

Universal Analytics: How to track conversions when URL doesn't change?

I'm in the process of upgrading a couple of sites to Universal Analytics and need some help setting up goals for conversion tracking...
I am now using auto event tracking (click listener) to see where users are clicking on the sites' forms, but I'm not sure how I can create goals for form submissions as the URL does not change. (Previously I was sending virtual pageviews when the submit button was clicked, but I don't think it's possible to do this in Universal Analytics?)
I know by using the click listener I can still see how many times the submit button of the form is clicked, but I need to set this up as a goal so I can monitor the cost per conversion of my AdWords campaigns.
Any help appreciated!
loop, if you are using GTM, you can simply use Form Submit Listener:
This listener then could fire an event tracking, which will serve as the condition for any conversion goals you might need. Just keep in mind when setting the conditions for goals, ALL of the Event-related dimensions (category, action, label) need to match, even though you can use only one (for example category = form submitted) as well.

Joomla: editable list screen

I have a joomla site where users can log in. Once logged in, a user can display a list screen -- say, a contact list with a name column and a phone number column. I call it a list screen, but I guess it could be called a list view, grid view, etc.
I'd like to make one of the columns (say, the phone number column) editable in place; meaning, I don't want to force the user to open a contact editing form. Thus, in the phone number column, a text box should be displayed on each line. The textbox contains the existing data for that row. The user can change the phone number in the text box directly in the list screen, and then press some 'save' icon on that row to save only that row (and only if it has changed). It'd be nice if the saving was done with an AJAX request, but it'd be ok to submit a form for now.
Based on the 'list screen' in the book "Learning Joomla Extension Development", I can currently display the correct list of items for the user. Does any one have example/tutorial of how to do the saving of each row individually? It seems like all list screens that I see have a link which must be clicked to open an edit form, as opposed to allowing editing in place.
Thanks
You have to write a component first. Which will basically do the saving part of the individual row. So basically your component URL takes parameter as row_id phone number etc and have a update query updating the database.
Second is you need to write a javascript function which is called on click of every save button. The javascript function reads row details by reading from the DOM. and then fire an ajax request to the above mentioned component. the URL to the above mentioned component should have format=raw.
The result from the component update queries can be returned as true or false. And accordingly read by javascript ajax response. based on which A flag could be shown saying row updated. I can help you with code further if you describe it in more details

Resources