addCustomQuery( 'NinjaForms', "SELECT id, title FROM %snf3_forms ORDER BY updated_at DESC", function ($item) { return [ 'ID' => $item->id, 'post_title' => $item->title, ]; } ); } public function addGoalType($types) { array_push( $types, [ 'name' => 'NinjaForms', 'label' => 'Ninja Forms', 'itemName' => __('On submit of form'), 'help' => __('If the visitor submits this form it will add a point to the tested variant.') ] ); return $types; } public function catchFormSubmits($submission) { $formId = $submission["form_id"]; $abTestTracking = new ABTestTracking(); $abTestTracking->trackPostId($formId, 'NinjaForms'); } }