November Happy Hour will be moved to Thursday December 5th.

IKpiResult: trying to tell which form instance triggered the event.

Vote:
 

Hi all, currently I'm implementing a Kpi using Form Submit as conversion goal, so, the EvaluateProxyEvent it's linked to FormSubmissionFinalized. 

Currently, we are doing AB Test for form sumbissions, trying to tell if an image change or a caption change in a block, inspires the users to click or to fill and submit a Form X. Problem is that the same form can be located at different places and is impossible to detect whichone is, because the only elements I have to identify a form is the ContentGUID which is unique for the Form.

public override IKpiResult Evaluate(object sender, EventArgs e)
{
   var conversionResult = new KpiConversionResult() { KpiId = Id, HasConverted = false };
   var formSubmission = (e as FormsSubmittedEventArgs);
   if (formSubmission != null)
           conversionResult.HasConverted = formSubmission.FormsContent.ContentGuid == FormGuid; // impossible to tell which instance of the form triggered the event.

return conversionResult
}
#250269
Edited, Mar 16, 2021 21:47
Vote:
 

Hi Celerno,

As I see the submitted-form-kpi implementation currently supports only the FormGuid to check the converted value, with the FormGuide is assigned in the Validate method from a matched one among the list of pair of formGuid and formPath returned by the GetAllFormNamesandIds method.

I think you must get the code and changing it to match your evaluation, this is a short description:

  • Instead of the simple list of pair of formGuid and formPath (GetAllFormNamesandIds method), it should be a list of formGuid and addition information to able to identify the place the Form on.
  • On the Form you can place a hidden element for containning the page/ContentArea that the Form is on - you might need to implement a new hidden element for this.
  • Based the submitted value of the above hidden element (in the formSubmission) to compare to have converted value.

Hope this help!

Regards,

#252028
Edited, Mar 30, 2021 3:07
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.