def parse_interpolations(content, user = nil, id = nil)
      if Decidim.config.track_newsletter_links
        if id.present? && user.present?
          host = user.organization.host.to_s
          campaign = "newsletter_#{id}"

          links = content.scan(/href\s*=\s*"([^"]*)"/)

          links.each do |link|
            link_replaced = link.first + utm_codes(host, campaign)
            content = content.gsub(/href\s*=\s*"([^"]*#{link.first})"/, %(href="#{link_replaced}"))
          end
        end
      end

      if user.present?
        content.gsub("%{name}", user.name)
      else
        content.gsub("%{name}", "")
      end
    end
def parse_interpolations(content, user = nil, id = nil)
      if Decidim.config.track_newsletter_links
        if id.present? && user.present?
          host = user.organization.host.to_s
          campaign = "newsletter_#{id}"

          links = content.scan(/href\s*=\s*"([^"]*)"/)

          links.each do |link|
            link_replaced = link.first + utm_codes(host, campaign)
            content = content.gsub(/href\s*=\s*"([^"]*#{link.first})"/, %(href="#{link_replaced}"))
          end
        end
      end

      if user.present?
        content.gsub("%{name}", user.name)
      else
        content.gsub("%{name}", "")
      end
    end
If the newsletter body there are some links and the Decidim.track_newsletter_links = true
 it will be replaced with the utm_codes method described below.
 for example transform "https://es.lipsum.com/" to "https://es.lipsum.com/?utm_source=localhost&utm_campaign=newsletter_11"
 And replace "%{name}" on the subject or content of newsletter to the user Name
 for example transform "%{name}" to "User Name"