Getting id of vistor to use in TagManager

Is there a simple way to get the current vistor id in a TagManager plugin? In the script I want to combine data from the visitor and my custom code.


there are several ways to do this.
If you want to get the visitor id which is eg. also visible in the Cookie you can try this as customHTML and crosscheck if its the correct one.

var visitor_id;
_paq.push([ function() { visitor_id = this.getVisitorId();

Additionally you can push it to the data layer and store it as a variable.
Pleas let me know if you need any further support.

Thanks, I will try this out.