Sometimes, subtle pops of color is just what you need to take a performance stretch belt from great to greater. The Carto is the new "not-solid" solid...More
Sometimes, subtle pops of color is just what you need to take a perfor...
Whether you're storing your boat for the winter or hitting the road for an adventure, the NRS Super Stretch Neoprene Cockpit Cover seals your cockpit ...More
Whether you're storing your boat for the winter or hitting the road fo...
The NRS Men's Ignitor Jacket gives recreational boaters a basic but versatile option for immersion protection. Featuring 2 mm neoprene insulation and ...More
The NRS Men's Ignitor Jacket gives recreational boaters a basic but ve...
These pogies are clutch when you're paddling in frigid conditions, literally. The NRS Clutch Pogies combine our thickest neoprene construction to maxi...More
These pogies are clutch when you're paddling in frigid conditions, lit...
The NRS Co-Pilot knife lives up to its name. The compact design and lie-flat sheath pair seamlessly with your PFD, while features such as smooth and s...More
The NRS Co-Pilot knife lives up to its name. The compact design and li...
When you ask creative free-for-all Aaron Draplin to make a series of belts with the direction of “go for it,” the result is something that won’t...More
When you ask creative free-for-all Aaron Draplin to make a series of b...
/* === Mailchimp MERGE4 (GCLID/GBRAID/WBRAID) autofill === */
(function () {
var DEBUG = false; // set true to see logs
var COOKIE_MAX_AGE = 60*60*24*90; // 90 days
var FIELD_SELECTOR = 'input[name="MERGE4"], #mce-GCLID';
function log(){ if (DEBUG) try{ console.log.apply(console, arguments);}catch(e){} }
function qp(n){ try { return new URLSearchParams(location.search).get(n) || ''; } catch(e){ return ''; } }
function setCookie(k,v){ document.cookie = k + "=" + encodeURIComponent(v) + ";path=/;max-age="+COOKIE_MAX_AGE+";SameSite=Lax"; }
function getCookie(k){ var m=document.cookie.match(new RegExp('(?:^|;\\s*)'+k+'=([^;]+)')); return m?decodeURIComponent(m[1]):''; }
function fromGclAw(raw){ if(!raw) return ''; var p=raw.split('.'); return p.length>=3?p[2]:''; }
// 1) Capture from URL once and persist
var fromUrl = qp('gclid') || qp('gbraid') || qp('wbraid') || '';
if (fromUrl) {
setCookie('google_click_id', fromUrl);
try { localStorage.setItem('google_click_id', fromUrl); } catch(e){}
log('[MERGE4] captured from URL:', fromUrl);
}
// 2) Read value (cookie/localStorage/_gcl_aw fallback)
function readId(){
var id = getCookie('google_click_id');
if (!id) { try { id = localStorage.getItem('google_click_id') || ''; } catch(e){} }
if (!id) { id = fromGclAw(getCookie('_gcl_aw')) || ''; }
return id;
}
// 3) Apply to any Mailchimp form on the page (and future ones)
function apply(){
var id = readId();
if (!id) { log('[MERGE4] no id found yet'); return; }
// Ensure field exists and is filled
document.querySelectorAll('form').forEach(function(form){
if (!/list-manage\.com\/subscribe/i.test(form.action)) return;
var el = form.querySelector(FIELD_SELECTOR);
if (!el) {
el = document.createElement('input');
el.type = 'hidden';
el.name = 'MERGE4';
el.id = 'mce-GCLID';
form.appendChild(el);
log('[MERGE4] injected hidden field into form:', form.action);
}
if (!el.value) el.value = id;
el.type='hidden'; el.hidden=true; el.style.display='none'; el.style.visibility='hidden';
log('[MERGE4] value set:', el.value);
// Safety: ensure value at submit time
if (!form.__merge4Bound) {
form.__merge4Bound = true;
form.addEventListener('submit', function(){
var latest = readId();
if (latest && !el.value) el.value = latest;
log('[MERGE4] on submit value:', el.value);
}, true);
}
});
}
// Run now + watch for late-loaded forms
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', apply);
} else {
apply();
}
new MutationObserver(apply).observe(document.documentElement, {childList:true, subtree:true});
})();