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?
Any tracked link should be constrainable by its id attribute.
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?
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.
The literal value that I've added inside '${CTAEmailRef}' is 'btn' and it isn't populating any data. Without adding the 'link ID' parameter, that is when it shows results in all links that has been clicked on that email.
Is this a case you've come across?
No, the literal value in the template is the variable name (before being interpolated into the variable's value set at the email level).
That's why I'm asking you to look for the variable name — i.e. the ${mktoVariable} syntax — as the Link ID, as if Marketo were only seeing the template HTML.
No, the data doesn't populate using the variable name as well.
Is there an unconventional way that I could go about with capturing link IDs? I've thought about adding query parameters inside the links to differentiate them.
It looks like adding query parameters to the link is the only way that I found to capture direct links inside an <a> tag.
We'll just have to give up it for now. Thank your for your time.
My findings don’t agree with yours.
When I set this in the template:
<meta class="mktoString" id="link1" mktoname="Link 1" default="www.example.com" />
<meta class="mktoString" id="linkId1" mktoname="Link ID 1" default="my-id" />
<a href="https://${link1}" id="${linkId1}">GO</a>
And set values in the email asset:
I’m able to see the Link ID in the log:
And filter on it in a Smart List: