Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
Vue $emit not firing event

$emit event is not firing from inside component. Not sure If I am using $emit correctly but I am assuming I am not because it is not firing. I have a method coming from a mixin file so not sure if that could be causing issue as well.

UPDATE: The emit is firing but it only fires on a page load /hard refresh and then click the trigger

component:

 <template>
      <router-link v-if="useRouterLink" @click.native="$emit('cta-click', $event)" 
      :to="buttonHref" class="cta__button button" v-html="buttonText"> </router-link>
 </template>

parent:

 <CTA @cta-click="gtmCtaClick('Sign Up', 'click')"></CTA>

mixin file:

gtmCtaClick(linkText, action) {
  this.$gtm.push({
    event: 'cta_click',
    link_text: linkText,
    action: action
  })
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!