HubSpot leads integration
Besides other features, HubSpot offers you a way to track custom forms. The integration of these forms will help you track lead commissions.
The integration uses the form’s ‘onBeforeFormSubmit’ function.
The standard form code looks like this:
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
portalId: "1234567",
formId: "123c30ab-f09e-4c9a-ae7f-123e456f7f89"
});
</script>
The sale (lead) tracking code will be placed to the ‘onBeforeFormSubmit’ function mentioned above, like this:
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
portalId: "1234567",
formId: "123c30ab-f09e-4c9a-ae7f-123e456f7f89",
onBeforeFormSubmit: function ($form, submissionValues) {
var email = '';
submissionValues.forEach(function(currentValue, index, arr){
if (currentValue.name == "email") {
email = currentValue.value;
}
});
var sale = PostAffTracker.createSale();
sale.setOrderID(email);
sale.setProductID('__Form name/Id here__');
sale.setData1(email);
PostAffTracker.register();
}
});
</script>
In case you need help with this sale/lead tracking code, feel free to get in touch with us.
Click tracking
Do not forget this important step. The code added to HubSpot forms requires the click tracking code to be present in the same page. Add the click tracking code anywhere to the page with your HubSpot form – it does not matter if you place it before or after the HubSpot form’s code.
The leader in Affiliate software
Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!
Discover Post Affiliate Pro's flexible pricing plans tailored to fit your business needs, with options for Pro, Ultimate, and Network packages. Enjoy a free trial with no credit card required, no setup fees, and the freedom to cancel anytime. Benefit from features like unlimited affiliates, advanced reporting, customizable interfaces, and lifetime support. Save up to 20% with annual billing and take advantage of more than 220 integrations. Perfect for businesses seeking to enhance their affiliate marketing efforts. Visit now to find the ideal plan for you!
Effortlessly integrate your e-commerce site with Post Affiliate Pro and boost your affiliate program's success. Our expert team ensures seamless integration with your payment processor, handling technical issues along the way. Enjoy a free trial and free integration service, saving you time and maximizing your ROI. Join now and experience top-notch affiliate management with over 500 integration options.
Explore Post Affiliate Pro's comprehensive Affiliate Program Directory, featuring diverse opportunities with competitive commissions and flexible payout options. Discover programs across various industries, accept worldwide traffic, and elevate your affiliate marketing game. Join today and maximize your earnings!
Discover the power of the Lifetime Commissions plugin! Ensure lifetime referral tracking with unique customer identifiers, allowing affiliates to earn commissions on future sales without repeated clicks. Easily manage customer-affiliate relations and configure settings to suit your needs. Boost your affiliate program's efficiency with customizable options and ensure commissions for affiliates, even across different devices or channels. Explore seamless integration with eCommerce systems and enhance your marketing strategy today!