I’m a little frustrated with components. I’m trying to set a unique ID for each instance of a component, but I have to edit the component, and therefore edit all of them, to set an ID. How do I make this a variable property?
Can you wrap each instance of the component with a div that has the unique ID?
Yes, that’s what I’m doing as a workaround. It seems a bit strange to have to do that when components already have customizable properties though.
Facing the same issue here, has there been any fix or update on it? I want to track clicks on 20+ links on a site, is wrapping all of them in divs and assigning unique div IDs the only solution?
It depends on how you’ve setup your tracking, but I’d probably try setting your tracking with script. If you’re manually assigning tracking ID’s within each component as a component property, you can have a small script in the component that immediately assigns that wherever you want in that component.
When you turn a section into a component, then assign a property to the ID, you can’t override it in the settings tab per instance? Did I understand that correctly?
I created a slider, turned that into a component to reuse it across sites but also to use it multiple times within one page with different content.
Now i wanted to link to them in my on-page navigation and therefore I need different IDs.