Expand my Community achievements bar.

SOLVED

Exit link name instead of link url

Avatar

Level 2

Hi,

 

I have some lengthy external links in my website, which are very tough to identify which page it takes. Hence, I have added "name" attribute to all the link tags (<a>). But I am still seeing that the link URLs are getting fetched through launch, but not names. What might be the issue over here?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi @lakshmip2 ,

I assume you are using Analytics extension to trackin automatic exit links, in which, case you would see pev1, that is, linkurl in the exit links report. 

In case you want to send a friendly name to your exit link report, you might want to use custom implementation using a event based rule instead of auto exit link tracking, wherein you can set friendly name for your exit links.

View solution in original post

9 Replies

Avatar

Community Advisor

By default, Exit Links are tracked with the links' URLs.

If you want to track with your "name" attribute, you need to track those with a s.tl("e", ...) beacon.

Avatar

Level 2

hi @yuhuisg,

 

For this purpose, I am trying to define it through a rule. But I have to specify a URL, it is not being populated automatically.

lakshmip2_0-1622627966600.png

Could you please explain in detail about how to go for this?

 

Avatar

Level 2

I suggest create a dataelement to capture the information (linkname) of the link clicked and then pass that data element into the custom rule you've created.

Avatar

Community Advisor

@lakshmip2here's what you can do:

1. Create a Rule.

2. Add a Click event.

2.1. In that click event, use a selector that basically selects all <A> links that have URLs that are not of your website's domain name. I leave that as an exercise in writing CSS selectors to you.

3. Add an Adobe Analytics > Send beacon action, like what you've done in your screenshot.

3.1. In the Destination URL, specify %this.getAttribute(name)%.

This assumes that your links have the following specification: 

<a href="https://www.external-link.com" name="This is the name that I want to track to analytics">Click me!</a>

 

 

 

Avatar

Correct answer by
Level 2

Hi @lakshmip2 ,

I assume you are using Analytics extension to trackin automatic exit links, in which, case you would see pev1, that is, linkurl in the exit links report. 

In case you want to send a friendly name to your exit link report, you might want to use custom implementation using a event based rule instead of auto exit link tracking, wherein you can set friendly name for your exit links.

Avatar

Level 2

Hi @yuhuisg @atulsingh17 ,

 

Thanks for your response.

I have configured the rule as follows but it doesn't seem to work yet:

lakshmip2_0-1622632489655.png

 

Core : Click is as follows:

lakshmip2_2-1622632609241.png

 

Rule is as follows:

lakshmip2_3-1622632669670.png

 

 

All the links have a name attribute, and css selector is capturing the elements as expected.

 

 

Avatar

Level 2
Sorry to ask, but I fail to understand what doesn't seems to work (the linkname ?) ? Can you share the screenshot of server call ?

Avatar

Level 2
Hi, I think the changes took some time to reflect. I can now see the pev2 variable being assigned with the name attribute. Thanks for the help