From Chrome Developer Console, highlight elements to get JavaScript code. Built by: Alessandro Colarossi (alessandrocolarossi.com)
GTM Variable Builder:
This versatile tool empowers you to effortlessly highlight specific portions of a website, such as text, product IDs, prices, or page names. Once you've selected the desired content, simply click on the extension's icon. To observe the output of your highlights, navigate to the JS console in Google Chrome.
Execute the JavaScript code generated by the tool within the console. If the generated JavaScript function successfully captures the highlighted content, don't hesitate to incorporate it into a custom Google Tag Manager variable. This way, you can conveniently retrieve the selected information when needed.