Skip to main content
Level 2
Aug 17, 2023 3:49 AM UTC
Question

Capture link ID directly from an <a> tag?

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.

8 replies

SanfordWhiteman
User Group Leader
User Group Leader
Aug 17, 2023 5:34 AM UTC

Any tracked link should be constrainable by its id attribute.

Translate
Level 2
Aug 17, 2023 5:47 AM UTC

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?

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Aug 17, 2023 6:02 AM UTC

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.

Translate