Content Tracking tags are not working


We are trying to use the content tracking, but we are not receiving the data as expected. I’m not sure if I’m tagging the HTML elements correctly. Is there a specific way to tag list items?

My current tag looks like this:

<ul data-track-content="" data-content-name="Rating filter filter">
     <li data-content-piece="2 Star"\>
        <a id="filter-2" href="#" >2 Star</a>
     <li data-content-piece="3 Star" >
        <a id="filter-3" href="#" >3 Star</a>
     <li data-content-piece="4 Star" >
        <a id="filter-4" >4 Star</a>
     <li data-content-piece="5 Star" >
`        <a id="filter-5" >5 Star</a>`

Is there anything I’m missing or should I configure this some other way?

Thanks in advance!

1 Like

Are you using the javascript tracker? Did you enable content tracking in the tracking code?

Or if you use the Tag Manager:

Also for the " data-track-content" you don’t need the " =""". Though no idea if that matters.

1 Like

Hi Niels!

Thank you so much for your answer. We had the content tracking enabled as you explain, the problem was that we were entering the html attributes incorrectly, since the

    elements are not consider as blocks.

    The correct solution would be entering the data-track-content, the data-content-name and the data-content-piece inside each

  • :

    <ul class="filter-options" data-filter="rating">
         <li data-track-content="" data-content-name="'Rating filter'" data-content-piece="'3 Star'" >
            <a id="filter-3" href="#" class="rating3 Star">3 Star</a>
         <li data-track-content="" data-content-name="'Rating filter'" data-content-piece="'4 Star'" >
            <a id="filter-4" href="#" class="rating4 Star">4 Star</a>
         <li data-track-content="" data-content-name="'Rating filter'" data-content-piece="'5 Star'" >
            <a id="filter-5" href="#" class="rating5 Star">5 Star</a>

    Thank you so much for your answer, Niels!

    Kind regards,