简体   繁体   中英

Google Analytics: Tracking abandonment and goals for lightbox form

I have a series of forms which represent my site's Goals in Google Analytics. Each one redirects to the same page with a query string to differentiate between them (eg /thank-you/?form-name ).

For reasons outside of my control, these forms have to be popups lightboxes and while tracking goal completion is as simple as adding a Goal URI for each "thank you" page, I don't know how to track abandonment. Abandonment in this case would be a user clicking "Cancel" instead of "Submit" in the popup.

Does anyone know how I can setup goal abandonment tracking using clicks on the Cancel button? I read about _gaq.push for sending custom Events to track, but I couldn't find how to link that to a Goal and track it as an abandonment.

Is this possible? If so, how would I set it up? Can it be linked to a specific goal so I can track the abandonment of each form separately?


As an aside, for the situation above would it be better to have separate goals for each form or one goal for all forms differentiated by the goal URI query string?

In cases where you cannot add the GA code to the form (lightbox, or 3rd party), I would suggest you to create a virtual page view that will simulate a page visit on that form.

Use the following in your JS code that calls the form:

_gaq.push(['_trackPageview', '/your-directory/form']);

If you use Universal Analytics, then:

ga('send', 'pageview', '/your-directory/form');

Now the form will be rendered as a pageview, which will appears on your reports and Goals' funnel visualization. Remember to set it as a step in the goal settings:

漏斗步骤

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM