Can we track each audience's actions' duration on a webpage? - google-analytics

I have a webpage consisting of a modal popup that would show up on click. I want to give the link to several audiences, and track each audience's duration when opening the open button until they finally click the close button.
How do we track the duration?

You must track an event to be sent to Google Analytics when the user clicks on the buttons (both on Open and Close).
Time is calculated by Analytics for the difference between the first and last interaction.

Related

Events trigger after next click in Google Tag manager preview

My custom event does populate into my GA4 Analytics, but during testing, the events in the GTM preview don't show up until the next click after the triggering event.
Oddly, it seems that after the initial trigger of each event (with the followup click) they appear to
For the follow-up click, I can click anywhere on the page.
The trigger is set to "All Elements" and Firing when the element matches a CSS selector of [data-XXX="XXX"] and the page URL contains a keyword.
I'm concerned that due to the extra click needed I may be losing some non-zero portion of data. My site doesn't get too many of this particular event so every one counts. The event tracks our online reservation and I need it to be accurate in our Google Ads data so our ROI on ad spend is as accurate as possible.
I know there's a trigger on form submit, but the form doesn't actually trigger this way due to JS. And it does work with the "All Elements" trigger I'm just concerned about the extra click before I see it populate in the preview window.
After closer inspection I found that the followup click is not required.
The summary view does not appear to show ALL info for every single click in realtime. Instead if you choose to look into the data for each click as the happen you can see that the events are triggering as intended, but that new events don't always show in the summary view until after the next click registers.
Hopefully, a future GTM update may fix this as it is not intuitive that the summary view would ever not have the most current data.
TLDR: check the view for each click in the GMT preview and don't rely solely on the summary view.

Is there an option to track(goals) ajax form with checkbox that works screen by screen?

I have an ajax form with some questions of choice but every question will be displayed on new screen (screen by screen) by button.
I want to track users behavior on my form page. I want to know after which question user has left the page (which questions they filled up)
Also I would like to know from which devices they have visited the form page and how long they were on this page
Is it possible to track all of this by GA or GTM?
If the form is screen-by-screen as you said, it sounds like you need to track two things.
An event for clicking the "Next" button
A virtual pageview for each screen.
This way, you can look into your Exit Pages report to see what screen the left the page from.
As for device tracking information, that type of data is automatically captured by GA.
So, basically. You'd have a virtual pageview for the first screen (assuming this form is a popup modal). If it's not a popup modal, then you'd just have the normal pageview for that first screen.
For instance, if the user has to click a link/button for the form to start, then you'd, ideally, fire an event for clicking that link/button, fire a virtual pageview when the first screen loads, fire an event when the user clicks the next button, then rinse and repeat for the subsequent screens.
Also, it may be a good idea to track the last screen's "next" button (or "finish") button as a separate event. Then, you can see in your events report who has filled out all of the screens and submitted.
Another thing worth pointing out: If you also want to show which question was the last one filled out, you can provide the name of the question (or an id, or some kind of brief and canonical identifier) in the virtual pageview as a custom dimension.

How to track from which page the modal was popped up in google analytics?

I have an acknowledgement popup modals on near about 15 html pages which appears on successful form completion. How would I know/track from which page the modal was triggered?
I have added a google tag manager code for popup event of modals which shows the number of count it was popped up. I also read about Virtual page views but not sure if its a correct method to track page wise popups.
Please help.
TIA

Bounce rate in Google Analytics

I have website in which when a user land on the website(say xyz.com) . Website open with a pop up(no tracking is enable on the popup) and user cannot perform any action unless it closes the pop up and also the page is not reloaded after closing the pop up
below are my queries.
1) No tracking enable on pop up close
If user doesn't visit any more pages in the website post closing the pop up. But perform different action on same page (such as check box selection ,drop down selection) on which event are define. do still this page will be calculated as bounce page and visit will be calculated as bounce visit?
2) Tracking enable on pop up close .
If user doesn't visit any more pages in the website post closing the pop up. But perform different action on same page(such as check box selection ,drop down selection) on which event are define. do still this page will be calculated as bounce page and visit will be calculated as bounce visit?
3) Tracking enable on pop up close
Post closing pop up user doesn't perform any activity.
do still this page will be calculated as bounce page and visit will be calculated as bounce visit?
A bounce is a visit with only one interaction.
If both your site and the popup have tracking code that's two interactions and the visitor will not be counted as a bounce.
In the case of events it depends. You can set a flag in your event tracking code that determines if the event affects the bounce rate. By default an event will count as interaction, and a user with a pageview and an event will not count as bounce. However if you set the "noninteraction" flag to "true" the event will not be counted towards the bounce rate (i.e. somebody who has only one pageview and one or multiple event hit will still count as a bounce).
So for your examples, and any other use cases you can come up with, simply count the numbers of interactions that do not have a non-interaction flag set (and adjust your tracking code according to your use case). If the number is larger than 0 the visit will not be counted as a bounce.

how can fire only one click event even the user clicks button 2-3 times at the same time?

I have a add to list button.when user clicks on button the data in text box gets added in listbox.User can not add same data. but the problem is that is user clicks add button 2-3 times with in a seconds the data is getting added 2 times in list. And if user does not clicks on button like this my javascript validation is working fine but it is getting failed on this so fast click events.
Note:data is getting added only two time regardless of no of button clicks in a second.
So how can fire only one click event even the user clicks button 2-3 times at the same time?
In the method that handles the button click disable the button before you do anything else. Just before the method finishes, re-enable the button.

Resources