The milestone template comes out of the box with a Form Widget that you can embed in your page and be up and running in minutes.

You can easily customize it to your needs through your campaign wizard.

But sometimes that's not enough. You might need a completely different design to better promote your brand or maybe you have a deeper integration in mind.

For cases like these, you can use a bit of javascript to plug in your custom form.

Steps

  1. Add the campaign snippet before the closing body tag.

    2. After your form is submitted, run the identify method.

Sharing the link

Bear in mind that even if you skip using the Form Widget to capture participations for your campaign, you will still need to add it somewhere else on your website as it’s the only widget through which participants can get their unique link and invite others. 

In order to do that, you need to add the campaign snippet and Form Widget on any page you want to redirect them to. If you don't need to redirect them on a separate page then, you don't need to do anything else. As soon as the campaign.identify code runs, participants will get the Sharing State of the Widget and thus, their unique sharing link.

API integration

If you want to register the new participants over the Web API, use the Registration method.

If you want to capture GDPR consent as well, add the consents property in the user object. The Consent ID can be found in the Settings Page of the app, where the GDPR consents are added.

Live Example

Check a full example here with the complete code using bootstrap and jQuery.

📄 Note: This article is mainly to be followed for custom built websites and does not apply to landing page platforms with certain limitations/restrictions (e.g. Squarespace, Wix etc.) 

Did this answer your question?