# Trigger Google Analytics Event with Form Submission

**URL:** <https://community.hubspot.com/t/trigger-google-analytics-event-with-form-submission/11370>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [September 7, 2017, 1:12pm UTC](https://community.hubspot.com/t/trigger-google-analytics-event-with-form-submission/11370 "2017-09-07T13:12:17Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [February 13, 2018, 7:33pm UTC](https://community.hubspot.com/t/trigger-google-analytics-event-with-form-submission/11370/7 "2018-02-13T19:33:40Z")

</div>

Hi [@Daniel\_Marques](https://community.hubspot.com/u/daniel_marques),

You’ll want to put that inside the `onFormSubmit` callback, where the `_gaq.push` call is now. You’ll probably also want to check out the `ga.js` to `analytics.js` migration docs, if you haven’t already:

> **[Google Analytics  |  Google for Developers](https://developers.google.com/analytics/legacy/universal-analytics)**

---

_[View the full topic](https://community.hubspot.com/t/trigger-google-analytics-event-with-form-submission/11370)._
