Streaming live at 10am (PST)

Segment Event Analytics Tracking

Hi,

I’m looking to track button clicks, form inputs, and form submits via Segment and Amplitude. What’s an easy way to instrument event analytics via Segment in Webflow?

Is there an easier way than the below?

...
<a href="/signup" id="signup1" class="green-button">Signup Here!</a>
...
<script type="text/javascript">
  var link = document.getElementById('signup1');
  analytics.trackLink(link, 'CTA Clicked', {
    location: 'Center',
    color: 'Green',
    text: 'Signup Here!',
    CTA: 'Signup',
    category: 'Home Page',
    type: 'Button',
    pageTitle: document.title
  });
</script>
...