Analytics
4.8K members online now
4.8K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

pop-up tracking via google tag manager

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭
I have installed google analytics using google tag manager. I want to track goals after user successfully fills the details in the contact form page in my website. But instead of having separate thank-you page, we show success message using java script pop-up on the same page itself. Please help me to track this process? What all code snippets i need to add?

 

1 Expert replyverified_user

Re: pop-up tracking via google tag manager

Rising Star
# 2
Rising Star
Hi Digital M,

This really depends on your site and there are many ways to accomplish. The cleanest thing to do would be to have your developers modify the JavaScript to push an event to the dataLayer once the validation is complete. You can use this as a trigger for a virtual pageview.

Short of that you could use form listeners etc which can get complicated. If you want to go down that path, check out Simo's post on form tracking:

http://www.simoahava.com/analytics/track-form-engagement-with-google-tag-manager/

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn