Google Analytics Goal Funnel Count has number differences with Production Data - reactjs

I have this funnel visualization problem in Google Analytics. I have set up the funnel using the virtual pageview like so:
So basically what it tracks is that in activity page, when user clicks a button, it will show up a modal for registration and hits the /activity/virtual/open-volunteer-modal. After they fill out the forms, they click Register, and it will hits the /activity/virtual/submit-volunteer-modal.
Everything was fine, until I saw some difference in GA and Production values.
In GA, there are 3000 users that filled out the forms and submit their data. I was totally happy seeing this, but:
In Production DB, I only got 1906 users submitting their data.
I checked the code, and there is nothing wrong with it. It basically send a virtual page view when the value has been validated, so my question is how is this possible and is there any way to fix this? Or is it just intended behavior?

After further investigation, I found that some of the buttons that has open-volunteer-modal event is redirecting to submit-volunteer-modal. Hence, the submit-volunteer-modal value was bigger than the open.
Should have sipped some coffee first before working.

Related

Suggested ways to take a screenshot of a react page

I have a react app that serves a live dashboard to clients (SPA).
Within that dashboard, I have what you might call a 'summary' page that gives the user a periodic summary (in a timeframe of their choosing).
Some of those users, want to receive a periodic report (a screesnhot of that summary) as PDF to their emails.
My struggle is with the report generation part - one thing that I'm trying is do is have an automated process login to my webpage and take a screenshot.
However, it feels not best-practice, and causes issues (the page has an MFA that I somehow need to bypass, etc.) .
Bottom line, I was wondering if there is a known process to do what I'm looking for.
Thanks.

Check if a website's form is submitting to a database

General question: Assuming someone has normal viewing access to a form/survey (say a google form as an example), what would be the ways to tell if the form is actually using the data you imputed and doing something with it rather than just pretending it was submitted?
I have a specific case like this where I think that I'm looking at a fake form that doesn't submit to any database, etc. but I'm not entirely sure what I would be looking for to confirm that.
I initially looked to see what the form submitted to and it goes to another html page, and I viewed the code on that page too, and it has only html and no PHP or JS. Is it still possible that it submits to a database?
You cannot know what, if anything the server will do with the submitted values unless you have access to the code running on that server.

How to load data at launching Chrome App?

What's the best practice of loading data at launching Chrome App?
The landing page of my Chrome App is dependent on some configuration data, which I've stored in the chrome local storage. However, reading chrome local storage is an asynchronous process. Hence, after the App has launched, there is a period of time when the landing page doesn't show correctly.
To avoid this blank time (due to the asynchronous process of reading local storage), I'm thinking about reading data at background JS. However, I haven't googled out what's the best practice to do it.
Anybody has any comments? Thanks.
just listen to the onLaunched event
chrome.app.runtime.onLaunched.addListener(function() {
// load your data
});
Here's one piece of helpful suggestion I've got from the Google Group. Share here so that someone with the same problem might refer to it:
You can read from chrome.storage in the background page and open the window when the data is ready. However, the user experience might be even worse, because instead of the incorrect landing page, you have no user feedback at all.
The usual (and easy to implement) solution is to show your landing page with some visual feedback during data loading, like a spinning wheel with a "Loading" label. If you UI really requires the data to show up, you can add this visual indicator as an opaque div on top of the whole window.
Some people use splash screens, but I don't think it adds to the user experience.

How to integrate payment gateway in applications created using javascript frameworks like ExtJs?

Our application is a one-page application created using ExtJs. For any user action, the browser tab is never reloaded and all the actions are performed using ajax. A user can open/close multiple ExtJs windows/panels within the same browser tab, and this way everything remains confined to the same browser tab.
Now, we need to integrate payment gateway in the application, which involves redirecting the user to the bank website and having her brought back to our application.
The issue is that when browser redirects the user, then all the application javascript code along with panels and windows get destroyed, and when the user comes back to the application then she finds it to be different from one she left.
As a solution to this, we were thinking of using following two appraoches:
Option 1. Maintaining the state of application - When user leaves for the bank's website then somehow we maintain the state of application - like which windows are opened carrying what data, which variables have which values etc.. and when user returns back, we generate the same application state for her.
Option 2. Have a browser pop-up window for payment gateway - We intend to provide a button which will open a small pop-up window carrying the transaction details, and in this pop-up window the entire payment gateway process will take place taking care of redirection and everything.
Option 1 is proving to be very cumbersome and complicated as maintaining the exact state is not getting feasible.
For Option 2, we are not sure if this is safe and possible?
Has anyone implemented such an approach earlier. Otherwise, what are the other options which we can go for?
Thanks for any help in advance.
I faced the problem and I implemented it using websocket/polling in the main application while a new window pops up for the payment.
After the payment is successful the main application will be notified.
That way each payment runs in it own sandbox totally unbound from the main application which makes maintenance quite easy. Note that our backend create a new session for each payment using the existing one.
I think it is not uncommon to open new windows for payment that's why I decided to go this.

IE7 problem - session and cookie problem

I have one problem with IE7. Let me explain the scenario
I have opened my web based application in IE7 browser in TAB1 by using normal login feature. After successful login, i entered to the application home page and i do with my normal transaction say Trans1. Now i want to open my application again in another tab TAB2 in the same browser window.. what happens IE7 won't allow me to login on my application in the login page, it directly enters to the home page and when i do one transaction say "Trans2" it is going smoothly. Now when i again went to the TAB1 and doing one transaction it is opening the TAB2 page that i opened in TAB2.
It seems IE7 is sharing same session cookie in multiple tabs. Is there a workaround for the same scenario.
Anyone have any solution for this problem.
Appreaciate your help in this regard.
Thanks,
Manoja Swaro
It seems IE7 is sharing same session cookie in multiple tabs. Is there a workaround for the same scenario.
Well no. Cookies are by design shared between all instances of the same browser, whether in multiple tabs or multiple windows. You can only get two separate sessions by using different browsers, like an instance of IE and one of Firefox.
This changes a little in IE8, but in quite a complicated way you probably don't want to rely on. See http://blogs.msdn.com/ie/archive/2009/05/06/session-cookies-sessionstorage-and-ie8.aspx
This is why you should generally not be using cookies/sessions for keeping track of partially-completed transactions; one transaction will always interfere with the other. Better to either:
keep track of all incomplete transaction data in page/form data, like hidden fields
if that's too much data to keep passing back and forth, create an ID for the transaction that is remembered through page data, and store the actual data in the database.
You can also use a unique ID tied to the page to generate more unique cookie names, eg. 'preference.1234=foo' instead of just 'preference=foo', so that each instance will have its own cookies.
Yes. IE shares session/cookie between tabs.
Try to run a new browser (i.e. from Start menu) -- it helped with older versions of IE
and it works with my IE7.
AFAIK This happens with all tabbed browsers (FF for example).
Indeed, this is how all tabbed browsers work. Cookies are shared among all tabs. However they are not shared among multiple instances of the same application, but I doubt this will help you.
This is actually a serious problem for many applications. It is very difficult to keep track of the tabs - which are open, which are closed, when a new tab opens, and when an existing one makes a request.
There is one workaround I have found, but it's pretty messy. The idea is that you have to assign a unique ID to every tab yourself. Then, when a tab performs some actions, this ID has to be posted back to the server. Depending on the architecture of your application, the ID can be passed around in URLs or hidden form fields. If you're doing AJAX, this can make it easier to find a common place to add the ID. ASP.NET also has just one form at all times, so the hidden field is easy to do.
Naturally, on the server side you must check this ID and implement your own "tab sessions" based on it.

Resources