This content is likely not relevant anymore. Try searching or browse recent questions.
Event Goal Not Tracking 0 Recommended Answers 2 Replies 2 Upvotes
1 Recommended Answer
$0 Recommended Answers
We are trying to track a form fill "Submit" button on a website. We created the event code: ga('send', 'event', 'Submit', 'Quote', 'Click Button') and asked the web developer to place it in the code of the form. We were told because the form is built out dynamically using code from a 3rd party, the web dev is unable to add an HTML onclick attribute, and instead added an event listener that runs the ga('send', 'event', 'Submit', 'Quote', 'Click Button'); code after clicking. When we create an event goal in GA, it is not registering any form fills:
Category: Submit
Action: Quote
Label: Click Button
Value: [empty]

Is creating an event goal any different when using an event listener? I've pasted the code of the form fill below and bolded where the event code can be found. We tested it as both a submission and a button click so that's why it's added as a comment, as well.

$(window).load(function() {
                                                let bike = getParameterByName("bike",window.location.href),
                                                                stockno = getParameterByName("stk",window.location.href),
                                                                url = getParameterByName("url",window.location.href),
                                                                id = getParameterByName("id",window.location.href);
                                                                console.log("MESSAGE: " + $('.hbspt-form .field .input input[name="message"]'))
                                                                $('.hbspt-form .field .input input[name="stock_"]').val(stockno).change();
                                                                $('.hbspt-form .field .input input[name="message"]').val(bike).change();
                                                                $('.hbspt-form .field .input input[name="website"]').val('www.bretzrv.com/default.asp?page=xInventoryDetail&id='+id).change();
                                                                // $('.hbspt-form .field .input input[name="brand"]').val(brand).change();
                                                                console.log("MESSAGE: " + $('.hbspt-form .field .input input[name="message"]').val());
                                                                /* START: NS 6-5-19*/
                                                                //  $(".hbspt-form").on("submit", function(event) {
                                                                //             console.log('test');
                                                                //             ga('send', 'event', 'Submit', 'Quote', 'Click Button');
                                                                //   });
                                                                                                ga('send', 'event', 'Submit', 'Quote', 'Click Button');
                                                                 /* END: NS 6-5-19*/
All Replies (2)
Hello, I am reading that you are probably using hubspot embed forms? (hbspt)
If yes you can use that guide to help your developper setup the tracking.


marked this as an answer
Thanks for the shout out Tony, feel free to reach out if you still need help with this!
Last edited 10/12/19
marked this as an answer
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Unable to lock
Unable to unlock
Unable to pin
Unable to unpin
Unable to mark
Reported as off topic