• Resolved pedroalbaladejo

    (@pedroalbaladejo)


    Hi, I would like to share a one-click signup link that looks like this:

    https://uvxx.al/thanks/13xx94/lp13xx94?xxemail=<EMAIL>&xxname=<NAME&gt;

    By clicking on this link, the mailing list subscribers will be signed up for the campaign automatically.

    Where can I find the Mailpoet’s placeholders for <EMAIL> and <NAME>

    I have read that it is possible to create custom shortcodes for creating this link, but I was hoping to use placeholders as other autoresponders have.

    Thanks,

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @pedroalbaladejo,

    There are shortcodes available for the Email and Name of the subscriber as described in our documentation here:
    https://kb.mailpoet.com/article/215-personalize-newsletter-with-shortcodes

    However, for dynamically generating URLs like you are trying to do, we’ve seen issues where doing that with the shortcodes won’t work due to the way URLs are re-written when rendering the email (particularly if any tracking is enabled, since those URLs will be completely re-written).

    Instead, it will be necessary to generate the desired URL in code using a custom shortcode as you mentioned. We have a guide for this here:
    https://kb.mailpoet.com/article/160-create-a-custom-shortcode

    If you need help with custom code for that, we recommend reaching out to someone from Codeable: https://codeable.io

    Thread Starter pedroalbaladejo

    (@pedroalbaladejo)

    I already found out how to edit your code example:

    add_filter('mailpoet_newsletter_shortcode_link', 'mailpoet_custom_shortcode_referral_link', 10, 5);
    
    function mailpoet_custom_shortcode_referral_link($shortcode, $newsletter, $subscriber, $queue, $arguments) {
      // always return the shortcode if it doesn't match your own!
      if ($shortcode !== '[link:referral]') return $shortcode;
      
        $email = $subscriber->getEmail();
        $name = $subscriber->getFirstName();
    
      $referral_link = "https://example.com/thanks/?email={$email}&name={$name}";
      
      return $referral_link;
    }

    Thanks anyway

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Share One-click signup link’ is closed to new replies.