Analytics
3.9K members online now
3.9K 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

Conversions tracking in Google Analytics using Event Tagging

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

I wonder if you can help:

I am trying to use an event tag to track conversions on our site:
onclick=ga('send', 'event', 'form-submit', 'click')


This is for a form that does not have a thank you page and only verifies the form was sent with some text.
They are using javascript so it's not your typical set up to place the tag within the form:
<a href="javascript&colon;void(0);" id="ctl01_aFormSubmit" class="btn btn-primary save pull-left" title="Submit">
Submit</a>

Can anyone tell me how I would I apply the event tag in this case?

Thank you in advance

3 Expert replyverified_user

Re: Conversions tracking in Google Analytics using Event Tagging

Top Contributor
# 2
Top Contributor
Hi,

best case scenario is not to tie it to onclick or onmousedown events as it will trigger an event even if the form has errors - did not pass validation. In these cases it ia best to place the js event code in the validation script so only when the validation process is a success > send the event.

The code itself is the same:
ga('send', 'event', 'form-submit', 'success');

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: Conversions tracking in Google Analytics using Event Tagging

Top Contributor
# 3
Top Contributor
In addition to the excellent advice by Zorin, you could optionally do this in Google Tag Manager which allows you to automatically track events once the form is submitted.

Re: Conversions tracking in Google Analytics using Event Tagging

Follower ✭ ☆ ☆
# 4
Follower ✭ ☆ ☆
Zorin - where and how do I add the tag to the validation code?

<div class="row mod-form-builder-info"> <div class="alert alert-success"><button type="button" class="close" data-dismiss="alert"> ×</button>Your message was sent successfully. Thanks!</div> <div class="alert alert-error hide"> <button type="button" class="close" data-dismiss="alert"> ×</button></div>
</div> <div class="form"> <div class="row"> <label>Name</label> <input id="nWelgLg-8kStB2X1594ESw" type="text"> </div> <div class="row"> <label>Phone</label> <input id="cujVZpOAd0iSKtymt4cK0A" type="text"> </div> <div class="row"> <label>Email</label> <input id="tmOnG7TYEkavU8ZAN1szWA" autocomplete="off" type="text"> </div> <div class="row"> <label>Dental Need</label> <textarea id="g14EufN-Y0yv6Z915L42PA" rows="5" cols="1"></textarea> </div> </div> <div class="row clearfix"> <div class="art-reward-points"> <a style="" href="javascript&colon;void(0);" id="ctl01_aFormSubmit" class="btn btn-primary save pull-left" title="Submit">Submit</a> <div class="loading pull-left"> </div>

Re: Conversions tracking in Google Analytics using Event Tagging

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆
Dave - Thank you.. we will probably invest in adding Tag manager in the future.

Re: Conversions tracking in Google Analytics using Event Tagging

Top Contributor
# 6
Top Contributor
Hi,

validation is usually inside a js file as an external resource - if you can send me the URL I may be able to help a bit more.

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: Conversions tracking in Google Analytics using Event Tagging

Follower ✭ ☆ ☆
# 7
Follower ✭ ☆ ☆
Wow You are awesome!
view-source:http://www.bestdentistboston.com/contact

Re: Conversions tracking in Google Analytics using Event Tagging

Follower ✭ ☆ ☆
# 8
Follower ✭ ☆ ☆

HI Zorin - Did you have time to look at that landing page?

view-source:http://www.bestdentistboston.com/contact

Re: Conversions tracking in Google Analytics using Event Tagging

Community Manager
# 9
Community Manager
This thread has been moved to the Google Analytics Community.

Re: Conversions tracking in Google Analytics using Event Tagging

Follower ✭ ☆ ☆
# 10
Follower ✭ ☆ ☆

What does that mean?

The other participants won't get my responses?