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

209
Views
Google Tag Manager - Custom Variable - Get Header text when click a link

I'm having an issue right now with getting the right element for a variable.

Here is what I want to accomplish

When a user click on a link from the sidebar, I want the following info :

  • Click text
  • Click URL
  • Click ID
  • Click Element
  • Click Classes
  • Page URl

At this moment I can have all but Click Classes which is empty ""

But I also want when I click the link or the button, I also want the title that is in the elementor container.

Image link : https://i.imgur.com/NoDv2wh.jpg

I already setup my TAG and Triggers

So I tried following some of the info I found one the forum, but clearly I have no idea how to accomplish that and I search a lot on Google without clear indications.

Here the code for my custom JS

function() {     
return {{Click Element}}.closest(".elementor-widget-container").find('h4').text();}

Right now, I just want to be able to create a custom variable to get the header text when I click on a button or a link.

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!