Hi Gang-
I'd like to add a piece of code to my US business unit pages to show Canadian visitors our opt-in button to ensure compliance with the new candian anti-spam regulations. It would be much faster to merely query on country & then when Canada display the opt-in, than to create a 2nd set of everything for only canadian viewers. As we market to both countries in English we consider them a single business unit.
Does anyone have any recommendations on this? Perhaps Erik H has already written a help doc. He has already written about GeoIP lookup,
<**** type="text/javascript" language="Javascript"> // convert the JSON => Object var geoip = eval("(" + mktoPreFillFields + ")"); // pull out the inferred fields for use later var geo_country_code = geoip.InferredCountry; </*****>
jQuery(document).ready(function($){ // allow in-domain javascript access // see http://www.nczonline.net/blog/2009/09/15/iframes-onload-and-documentdomain/ document.domain='hollebone.ca'; // use the marketo field to populate the form $('#Country option[value='+geo_country_code+']').attr('selected', 'selected'); $('#State option[value='+geo_country_region +']').attr('selected', 'selected'); })
There are the two bits of code from his page... I'm currently replacing the field label to include a link to my privacy policy..
<**** type="text/javascript"> $('#RequestedNewsletter').parent().children('label').html('I accept the website <a target="_blank" title="Our Terms and Conditions" href="http"//example.com/tancd.html">terms and conditions</a>.'); </***** > How do I put these two pieces of code together to only show the field #RequestedNewsletter whengeoip.InferredCountry
= Canada.