Capture link ID directly from an <a> tag? | Community
Skip to main content
New Participant
August 17, 2023
Question

Capture link ID directly from an <a> tag?

  • August 17, 2023
  • 1 reply
  • 2415 views

Hello is it possible to use the report feature to track an id from an <a> tag? I know that if I were to add a link inside a rich text editor, I was able to add an ID of a link (based on this post) and it would capture the ID in a report. Then I was able to filter the data based on that ID.

 

Now I want to do this to a button made from an <a> tag. The code is below.

 

 

<a class="blue-btn" href="${CTALinkA5}" style="background-color:${CTABkColorA5};border:2px solid ${CTABorderColorA5};border-radius:8px;color:${CTACopyColorA5};display:inline-block; font-family: 'Montserrat', sans-serif; font-size:18px; font-weight:500; line-height:42px;text-align:center;text-decoration:none;width:${CTAWidthA5}px;-webkit-text-size-adjust:none;mso-hide:all;" id="${CTAEmailRef}">${CTACopyA5}</a></div>

 

 

Is it possible?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
New Participant
August 17, 2023

Any tracked link should be constrainable by its id attribute.

New Participant
August 17, 2023

Okay so we created an email and have sent it to testers to click on a link inside a rich text editor v.s. a link directly from an <a> tag. Below are the query conditions that we have added:

 

Both links had two different IDs with the same href links. If we look for the link ID that was inside the rich text editor, it would show data. But if we look for the link ID that was in the <a> tag, it would not show data.

 

What are we missing?

SanfordWhiteman
New Participant
August 17, 2023

Can you look for a link with the literal value in your template (${CTAEmailRef})?

 

If this exists you have an order-of-operations problem specifically because you’re using a variable.