1. Component Guide
  2. Share links
  3. Track as sharing links
Share links example

Track as sharing links

Where the component is used to allow users to share content on social media, tracking can be added that uses Social Interactions. If this option is not included, it is assumed the component is simply linking to social media pages and the extra options are omitted from the tracking call.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/share_links", {
  track_as_sharing: true,
  links: [
      href: "share",
      text: "Share on Facebook",
      icon: "facebook"
} %>