I’m using content tracking to track the interactions with my main (mega) menu.
Part of the menu dropdown content is added dynamically when the user intends to open the menu item.
My tracking attributes are added correctly, but the dynamic added elements are not being tracked.
So in this example, the Discover all topics
link is present on pageload and tracked correctly. The Agency
link is added dynamically and is not tracked.
Hey @rmeekers 
I haven’t implemented this functionality for a while, but as far as I remember, the solution would be to call
_paq.push(['trackVisibleContentImpressions']);
every time you want the tracker to scan for newly presented content.
If you’re relying on detection of content by it’s DOM elements being tagged, you can also verify if they are actually “visible” for the tracker by executing
_paq.push(["logAllContentBlocksOnPage"]);
My personal preference is to not use the automatic detection and execute both trackContentImpression
and trackContentInteraction
methods from my own code as content is presented, but of course this is not always possible.
Another way you could achieve that would be using Tag Managers “element visibility” trigger.
I hope this will help you, let me know if you have any questions 
3 Likes
This doesn’t work.
Even if I execute those functions after the elements are loaded (and tagged with the required attributes) they are not tracked.
@rmeekers can you send me more details? I can take a look at your instance and check the problem
@rmeekers how are content tracking parameters applied to elements? Are they added in website code?
Have you tried to set element visiblity trigger for submenu and set custom script to track interactions with content there?
The tracking attributes are added with an event listener.
And yes. I’ve tried the visibility trigger. Doesn’t work.