[email-submission-form button-text=”Join Free” include-trends-opt-in=”true” success-url=”https://thehustle.co/new-thank-you-v2/” default-source=”thehustleco” default-medium=”home-exit-popup” default-campaign=”home-page” form-id=”exit-popup-general” optinmonster-conversion=”true”]
<script sort=”textual content/javascript”>
var onloadCallback = perform() {
grecaptcha.render(‘verify-your-humanity’, {
‘sitekey’ : ‘6LdddrcZAAAAALyttpvOqiwQGwq5BNhgDz4tMQGE’
});
};
perform getCookieValue(a) [^;]+)s*’ + a + ‘s*=s*([^;]+)’);
return b ? atob(decodeURIComponent(b.pop())) : ”;
perform getCookie(title) {
var cookieArr = doc.cookie.break up(“;”);
for(var i = 0; i < cookieArr.size; i++) {
var cookiePair = cookieArr[i].break up(“=”);
if(title == cookiePair[0].trim()) {
return decodeURIComponent(cookiePair[1]);
}
}
return null;
}
perform setHiddenFieldValue(wrappingDiv, searchParams, className, utmName, cookieName, defaultValue) {
var el = wrappingDiv.getElementsByClassName(className)[0];
var existingVal = el.getAttribute(‘worth’);
if (utmName == ‘ref’) getCookie(cookieName);
else
if ((existingVal == null || existingVal == ” || existingVal == defaultValue) && (newVal != null && newVal != ”)) {
el.setAttribute(‘worth’, newVal);
}
}
perform setHiddenFieldValueFromUtm(
wrappingDiv,
searchParams,
className,
utmName,
defaultValue
) {
var el = wrappingDiv.getElementsByClassName(className)[0];
if (el != null) {
var existingVal = el.getAttribute(“worth”);
var newVal = searchParams.get(utmName);
if (newVal != null && newVal != “”) {
el.setAttribute(“worth”, newVal);
}
}
}
perform initForm() {
var wrappingDivs = doc.getElementsByClassName(’email-submission’);
Array.prototype.forEach.name(wrappingDivs,wrappingDiv => {
var sp = new URLSearchParams(window.location.search);
setHiddenFieldValue(wrappingDiv, sp, ‘funnel-source’, ‘utm_source’, ‘funnel_source’, ‘thehustleco’);
setHiddenFieldValue(wrappingDiv, sp, ‘funnel-campaign’, ‘utm_campaign’, ‘funnel_campaign’, ‘home-page’);
setHiddenFieldValue(wrappingDiv, sp, ‘funnel-medium’, ‘utm_medium’, ‘funnel_medium’, ‘home-exit-popup’);
setHiddenFieldValue(wrappingDiv, sp, ‘funnel-referral’, ‘ref’, ‘funnel_referral’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-a’, ‘a’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-c’, ‘c’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-o’, ‘o’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-oc’, ‘oc’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-e’, ‘e’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-f’, ‘f’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-r’, ‘r’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-t’, ‘t’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-s1’, ‘s1’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-s2’, ‘s2’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-s3’, ‘s3’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-s4’, ‘s4’, ”);
setHiddenFieldValueFromUtm(wrappingDiv, sp, ‘funnel-s5’, ‘s5’, ”);
var error_message = getCookieValue(‘validate-email-message’);
if (error_message && error_message.trim() != ”) {
var error = wrappingDiv.getElementsByClassName(‘funnel-error’)[0];
var prev_email = getCookieValue(‘funnel_email’);
error_message = prev_email + ” will not be legitimate. Please strive once more”;
error.innerHTML = error_message;
error.model=””;
}
});
if (false) {
initCaptchaFormV2();
}
}
perform initCaptchaFormV2() {
var v3RecaptchaResponseEl = doc.getElementById(‘recaptcha-response-v3′);
v3RecaptchaResponseEl.parentNode.removeChild(v3RecaptchaResponseEl);
var wrappingDiv = doc.getElementById(’email-submission’);
var subForm = wrappingDiv.getElementsByClassName(’email-submission’)[0];
var captchaVersion = doc.createElement(‘enter’);
captchaVersion.class=”g-recaptcha hidden-input”;
captchaVersion.sort=”hidden”;
captchaVersion.title=”g-recaptcha-response-v2″;
captchaVersion.worth=”true”;
subForm.appendChild(captchaVersion);
var captchaEl = doc.createElement(‘div’);
captchaEl.id = ‘verify-your-humanity’;
subForm.prepend(captchaEl);
var captchaApiScriptEl = doc.createElement(‘script’);
captchaApiScriptEl.src=”https://www.recaptcha.web/recaptcha/api.js?onload=onloadCallback&render=specific”;
captchaApiScriptEl.async = true;
captchaApiScriptEl.defer = true;
doc.head.appendChild(captchaApiScriptEl);
}
window.addEventListener(‘DOMContentLoaded’, (occasion) => {
initForm();
});
if(typeof hp_interval == ‘undefined’) {
var hp_interval = 0;
var hp_ts = 0;
var hp_try = 0;
jQuery(doc).prepared(perform ($) {
hp_interval = setInterval(perform(){
$(‘enter.hp_ts’).val(hp_ts);
hp_ts += 1;
if(hp_ts >= 180) {
clearInterval(hp_interval);
}
},1000);
$(‘.email-submission:not(.prevent-default)’).submit(perform (e) {
var type = $(this);
if(hp_ts < 3 && hp_try < 1) {
e.preventDefault();
if (type.discover(‘.email-form-submit-message’).size < 1) {
type.discover(‘.email-form-wrap’).after(‘<p class=”email-form-submit-message” model=”padding: 0em 1.5em;”>Too quick! Are you a human? Attempt once more please.</p>’);
}
hp_try += 1;
hp_ts = 0;
$(‘enter.hp_try’).val(hp_try);
}
});
});
}
</script> <div class=”email-signup” id=email-submission>
<div class=”funnel-error” model=”show:none;”></div>
<type class=”email-submission ” id=”exit-popup-general” motion=”https://cms.thehustle.co/api/v1/contacts/wordpress_create” technique=”publish” autocomplete=”e-mail”>
<div class=”email-form-wrap”>
<enter class=”funnel-source hidden-input” sort=”hidden” title=”supply” worth=”thehustleco”>
<enter class=”funnel-campaign hidden-input” sort=”hidden” title=”marketing campaign” worth=”home-page”>
<enter class=”funnel-medium hidden-input” sort=”hidden” title=”medium” worth=”home-exit-popup”>
<enter class=”funnel-form-id hidden-input” sort=”hidden” title=”form-id” worth=”exit-popup-general”>
<enter class=”funnel-referral hidden-input” sort=”hidden” title=”referral_code”>
<enter class=”funnel-fail-url hidden-input” sort=”hidden” title=”fail_url” worth=””>
<enter class=”funnel-ip-country-wordpress hidden-input” sort=”hidden” title=”ip_country_wordpress” worth=”HN”>
<enter class=”funnel-submission-url hidden-input” sort=”hidden” title=”submission_url” worth=”https://thehustle.co/10062022-tupperware/”>
<enter class=”funnel-a hidden-input” sort=”hidden” title=”a” worth=””>
<enter class=”funnel-c hidden-input” sort=”hidden” title=”c” worth=””>
<enter class=”funnel-o hidden-input” sort=”hidden” title=”o” worth=””>
<enter class=”funnel-oc hidden-input” sort=”hidden” title=”oc” worth=””>
<enter class=”funnel-e hidden-input” sort=”hidden” title=”e” worth=””>
<enter class=”funnel-f hidden-input” sort=”hidden” title=”f” worth=””>
<enter class=”funnel-r hidden-input” sort=”hidden” title=”r” worth=””>
<enter class=”funnel-t hidden-input” sort=”hidden” title=”t” worth=””>
<enter class=”funnel-s1 hidden-input” sort=”hidden” title=”s1″ worth=””>
<enter class=”funnel-s2 hidden-input” sort=”hidden” title=”s2″ worth=””>
<enter class=”funnel-s3 hidden-input” sort=”hidden” title=”s3″ worth=””>
<enter class=”funnel-s4 hidden-input” sort=”hidden” title=”s4″ worth=””>
<enter class=”funnel-s5 hidden-input” sort=”hidden” title=”s5″ worth=””>
<enter class=”funnel-success-url hidden-input” sort=”hidden” title=”success_url” worth=”https://thehustle.co/new-thank-you-v2/”>
<enter id=”recaptcha-response-v3″ class=”g-recaptcha hidden-input” sort=”hidden” title=”g-recaptcha-response” worth=””>
<div class=”signup-icon” model=”show:none;”>
<svg width=”24″ viewBox=”0 0 24 24″ fill=”none” xmlns=”http://www.w3.org/2000/svg”><path d=”M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6Zm-2 0-8 5-8-5h16Zm0 12H4V8l8 5 8-5v10Z” fill=”#848B92″></path></svg>
</div>
<enter sort=”hidden” title=”hp_ts” class=”hp_ts” worth=”0″>
<enter sort=”hidden” title=”hp_try” class=”hp_try” worth=”0″>
<enter sort=”textual content” title=”first_name” placeholder=”Enter your title” worth=””>
<enter class=”signup-email” sort=”e-mail” title=”e-mail” placeholder=”Your e-mail deal with” required autocomplete=”e-mail”>
<enter class=”email-submit om-trigger-conversion” sort=”submit” worth=”Be part of Free”>
</div>
<div class=”validate-mistake-emails-message” model=”show:none;”></div>
<div class=”form-options” model=”show:none”>
<div class=”form-options-wrap”>
<div class=”trends-opt-in”>
<enter id=”trends_opt_in_email_submission” class=”trends-opt-in-checkbox” sort=”checkbox” title=”trends_opt_in”>
<label for=”trends_opt_in_email_submission” id=”trends_opt_in_label” class=”trends-opt-in-text”>Sure, I’d prefer to obtain further advertising emails on sizzling enterprise alternatives from Developments, by the Hustle.</label>
</div>
<div class=”privacy-text”>
<p>We’re dedicated to your privateness. The Hustle makes use of the knowledge you present to contact you about our related content material and companies. You might unsubscribe from these communications at any time. For extra info, take a look at our <a href=”https://thehustle.co/privateness”>Privateness Coverage</a>.</p>
</div>
</div>
</div>
<div submit-success>
<template sort=”amp-mustache”>
<p class=”c-message c-message–success”>Thanks for subscribing.</p>
</template>
</div>
<div submit-error>
<template sort=”amp-mustache”>
<p class=”c-message c-message–failed”>Your submission failed. Please strive once more!</p>
</template>
</div>
</type>
</div>