Plugin does not work
-
After a lot of messing around, this plugin simply didn’t work.
Much easier to add an onclick using the gform_submit_button function. Add the following to your functions.php file:
add_action( ‘gform_submit_button’, ‘ga_tracker’, 10, 2 );
function ga_tracker( $button, $form ) {
return “<button class=’button’ id=’gform_submit_button_{$form[“id”]}’ onclick=’__gaTracker(\”send\”, \”event\”, \”category\”, \”action\”, \”label\”, \”value\”);’>{$form[‘button’][‘text’]}</button>”;
}4 lines of code!
- The topic ‘Plugin does not work’ is closed to new replies.