Skip to content

Custom Success Response #4

@rickydazla

Description

@rickydazla

@jayvin Ji I just did this for UMS:

  var KlaviyoEmbedFormCallBacks = KlaviyoEmbedFormCallBacks || {};
  KlaviyoEmbedFormCallBacks.Success = function(data, wrapper){
    T3Core.TrackUserSignUpEmbed(wrapper);
    T3Core.TrackFacebookCompleteRegistration({
      content_name: wrapper.attr('data-ga-action')
    });
    $('.klaviyo_messages .success_message', wrapper).text("{{ 'general.newsletter_form.success_text' | t }}").show();
  }

The only thing I am changing is the success message. Is there a more efficient way to do that (without repeating / overwriting the TrackUserSignUpEmbed and TrackFacebookCompleteRegistration functions)?

ref:

https://github.com/Tricky3/Drink-Switchel/blob/klaviyo-embeds/theme/snippets/tricky3-klaviyo-script.liquid#L3-L10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions