Guys, I'm trying to get a value to populate my JS code dynamically. Here's an example.
I need to have a 17 digit VIN number like this "2T1BURHE6EC013995" to populate into my JS code for google adwords in this section "ecomm_prodid: 'REPLACE_WITH_VALUE',".
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: 'REPLACE_WITH_VALUE',
ecomm_pagetype: 'REPLACE_WITH_VALUE',
ecomm_totalvalue: 'REPLACE_WITH_VALUE',
I have a RegEX that can find the VIN number. var myRegxp = /[A-Z0-9]{17}/
My question is how can I get my VIN number to populate into my JS code dynamically. Can I just place my RegEx Var in and it pull it automatically?
Any pointers or help is greatly appreciated!