def meta_events_tracked_link_to(name = nil, options = nil, html_options = nil, &block)
      html_options, options, name = options, name, nil if block_given?

      unless html_options && html_options[:meta_event]
        raise ArgumentError, "You asked for a tracked link, but you didn't provide a :meta_event: #{html_options.inspect}"
      end

      if block_given?
        link_to(options, meta_events_tracking_attributes_for(html_options, meta_events_tracker), &block)
      else
        link_to(name, options, meta_events_tracking_attributes_for(html_options, meta_events_tracker))
      end
    end
def meta_events_tracked_link_to(name = nil, options = nil, html_options = nil, &block)
      html_options, options, name = options, name, nil if block_given?

      unless html_options && html_options[:meta_event]
        raise ArgumentError, "You asked for a tracked link, but you didn't provide a :meta_event: #{html_options.inspect}"
      end

      if block_given?
        link_to(options, meta_events_tracking_attributes_for(html_options, meta_events_tracker), &block)
      else
        link_to(name, options, meta_events_tracking_attributes_for(html_options, meta_events_tracker))
      end
    end
This works exactly like Rails' built-in +link_to+ method, except that it takes a +:meta_event+ property in
 +html_options+ and turns the link into a tracked link, using #meta_events_tracking_attributes_for, above.

 The +:meta_event+ property is actually required; this is because, presumably, you're calling this method exactly
 because you want to track something, and if you didn't pass +:meta_event+, you probably misspelled or forgot
 about it.

 Obviously, feel free to create a shorter alias for this method in your application; we give it a long, unique
 name here so that we don't accidentally collide with another helper method in your project.