Dynamic id related issue

How to pass dynamic id while creating a variable in tag manager?