How to generate a Click ID within a JavaScript code

AnyTrack has click id placeholders such as --CLICK-ID-- and {click_id} that will automatically be replaced with generated click ids on your links.

AnyTrack has click id placeholders such as --CLICK-ID-- and {click\_id} that will automatically be replaced with generated click ids on your links and forms.

Those placeholders will only work on known elements that have been tracked by AnyTrack. If you try to use the placeholder on a custom JavaScript code or on unknown elements, you may find the placeholders will not work. However, you still have other options to generate click ids for your needs:

Generate Click IDs without triggering events

Generate Click IDs on redirect links

Generate Click IDs from custom events