Jon Imms
asked on
Gravity Forms submission tracking.
I am trying to add some javascript tracking code to a gravity forms submission.
I would like the following to be added to the submit button :
<script type="text/javascript">
window._pq = window._pq || [];
_pq.push(['track', 'Appcomplete']);
</script>
I know i have to use the gform_after_submission hook below, but i'm not sure how i would add a javascript script into a php function?
add_action( 'gform_after_submission_1' , 'after_submission', 10, 2);
function after_submission() {
}
I would like the following to be added to the submit button :
<script type="text/javascript">
window._pq = window._pq || [];
_pq.push(['track', 'Appcomplete']);
</script>
I know i have to use the gform_after_submission hook below, but i'm not sure how i would add a javascript script into a php function?
add_action( 'gform_after_submission_1'
function after_submission() {
}
ASKER
From what i'm being told, this is bound when the submit button is clicked.
http://support.perfectaudience.com/knowledgebase/articles/212490-segmenting-api
<script type="text/javascript">
window._pq = window._pq || [];
_pq.push(['track', 'Appcomplete']);
</script>
http://support.perfectaudience.com/knowledgebase/articles/212490-segmenting-api
<script type="text/javascript">
window._pq = window._pq || [];
_pq.push(['track', 'Appcomplete']);
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.gravityhelp.com/documentation/article/gform_post_render/
but the code you provided is not bound to a submit action, it is executed as the page loads, it doesn't need o be bound to a form submit action, just place it on the page in the footer