Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Launch track link page

Avatar

Level 9

Read

Hello everyone,

 

Any suggestion how to track li with href?

 

 

1982luca_0-1605513120645.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 8

@Luca_Lattarini - If you're looking to track clicks on the <a> tags that are found in your list, you can do this with a Launch rule. Your rule, with CSS selector, may look something like this:

evolytics_brian_1-1605559989417.png

Using "div#dashboard-deals li a" will pick up any/every <a> tag that falls under a <li> inside your div. This assumes the following page structure (from your image):

...
...
  <div class="collapse" id="dashboard-deals">
    <ul>
      <li><a href="/someLink1.html">some text 1</a></li>
      <li><a href="/someLink2.html">some text 2</a></li>
      <li><a href="/someLink3.html">some text 3</a></li>
      <li><a href="/someLink4.html">some text 4</a></li>
    </ul>
  </div>
...
...

From there, you'd set up the rest of your rule as you normally would.

 

View solution in original post

5 Replies

Avatar

Community Advisor

Are you saying that inside the <li>, there is no <a> element?

Avatar

Level 9
Yes, i have this <a href="">XXX<a/>

Avatar

Level 1

Can you add an event listener to it?

Avatar

Correct answer by
Level 8

@Luca_Lattarini - If you're looking to track clicks on the <a> tags that are found in your list, you can do this with a Launch rule. Your rule, with CSS selector, may look something like this:

evolytics_brian_1-1605559989417.png

Using "div#dashboard-deals li a" will pick up any/every <a> tag that falls under a <li> inside your div. This assumes the following page structure (from your image):

...
...
  <div class="collapse" id="dashboard-deals">
    <ul>
      <li><a href="/someLink1.html">some text 1</a></li>
      <li><a href="/someLink2.html">some text 2</a></li>
      <li><a href="/someLink3.html">some text 3</a></li>
      <li><a href="/someLink4.html">some text 4</a></li>
    </ul>
  </div>
...
...

From there, you'd set up the rest of your rule as you normally would.

 

Avatar

Level 9