Mobile Registration Request Fails Due UTM Function

I have a question regarding the _record_utm_registration_attribution function inside the registration view.

We are currently working on implementing a custom registration method on a custom fork based on Maple.3. We also have a custom fork for mobile applications.

There is a problem caused by the function _record_utm_registration_attribution in the following flow:

  1. The mobile application sends requests with the HttpOnly cookie.
  2. RegistrationCookieConfiguration.current().utm_cookie_name returns empty string ‘’ because we have not set any UTM referred.
  3. The _record_utm_registration_attribution function catches the HttpOnly cookie because utm_cookie_name is empty string.
  4. It fails because HttpOnly cookie is not in JSON format.

I fixed this problem by adding an additional check to the if-clause.

if user and utm_cookie and utm_cookie_name: 

I would like to ask whether _record_utm_registration_attribution should fail in this case and whether we should change the mobile application. Or is it an edge case that should be handled?

Thank you.