Hardcoding Affiliate IDs in the Mailvio Forms
In this guide, we will walk you through the integration of opt-in forms with affiliate IDs for effective marketing strategies. We will show you the detailed process of hardcoding affiliate IDs in Mailvio forms, designed for pre-launch scenarios and essential use cases. By embedding Mailvio opt-in forms in renowned landing page builders like Convertri, you can achieve secure and efficient data capture during crucial stages of your marketing campaigns.

In this example we're using Convertri as our page builder, instructions will differ a bit depending on which website/funnel builder you are using but it will be similar enough for you to set it up still.
Step 1: Create a New Form in Mailvio
- Log in to your Mailvio account.
- Open the Email Module and navigate to "Forms."
- Click "Create Form" button.
- Select the group list where the contacts will be added.
- Choose Regular Form and proceed to form customization.
Step 2: Choose "Embedded" (NOT Hosted) for Code
- Do not select the "Hosted" option.
- Go to “Embedded” and customize:
- Match design styles (colors, font, button, etc.)
- Confirm your choices.
- Give your form a clear, descriptive name (e.g., Prelaunch Form) — avoid default names like "New Form."
- Click the "Save & Continue" button.
Step 3: Configure Fields and Hidden Input
- Step 1 of the form creation:
- Add Fields:
- First Name (set to "Required").
- Email Address (also "Required").
- Add a Hidden Input:
- Drag and drop the "Hidden Input" element.
- Set the name to your chosen identifier or "Field" (we used Jvzoo_ID in this sample).
- You can leave the "Field Value" blank or insert placeholder text for visual testing (we used JVZ-REPLACE in this sample).
- Click the "Save & Continue" button.
- Skip Steps 2 and 3 by clicking on the "Next" button.
Skip "Design Template" (Step 4) to avoid getting locked into double opt-in.
If you choose the Design Template, Mailvio will force double opt-in, and it cannot be reverted.
- Upon skipping the "Design Template" (Step 4), also bypassing the Step 5, you will proceed directly to Step 6, where you will copy the Form's code and paste it in Convertri.
- Click the "Finish" button.
Step 4: Embed the Form in Your Landing Page
- You've already copied the Form's generated HTML Embed Code from Mailvio.
- In Convertri, insert an HTML element.
- Click on the "Edit HTML" button and paste the HTML code.
- Adjust styling if necessary to match the page design.
- Click "Save" and "Publish" the page.
Step 5: Locate the Hidden Field Name Using DevTools
- Open the live page in a browser.
- Press F12 to launch DevTools.
- Inspect the form and find the hidden custom field, the value of the Affiliate ID.
E.g.: <input name="customField-567444" type="hidden" value=" {JVZ-REPLACE}">
- What's important is to copy the exact name attribute of that hidden field.
E.g.: customField-557444 (may vary per form)
Step 6: Add Custom Script in Convertri
- In Convertri, go to the page settings for the same landing page.
- Locate the "Custom Scripts" area (usually under "Page" settings).
- Use "Pre-sell script" and click on the edit icon.
- Paste in the following JavaScript (replace placeholder as needed):
<script>(function() {
function getURLParameter(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
var results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var aid = getURLParameter('aid'); // or use 'a_id' depending on your URL structure
var fields = document.getElementsByName('custom_field_5535'); // Replace with the real field name
for (var i = 0; i < fields.length; i++) {
fields[i].value = aid;
}
})();
</script>
Step 7: Test It
- Open the page and append an affiliate ID to the URL. E.g.: https://getquickvsl.com/intro?aid=457438567438
- Press F12 and check the form input.
- Confirm that the hidden field value = 457438567438.
Submit the form — the contact should be saved with the correct affiliate ID.
After submitting it can sometimes take a few minutes for the contact to show in the selected group in Mailvio.
Related Articles
Design your signup forms
How to Add a Signup Form? Step 1: Before you begin, you must make sure you are logged in to the MAILVIO control panel. Step 2: Once logged in to the MAILVIO control panel, click the "SIGNUP FORMS" tab at the top of the screen. Step 3: On the Signup ...
How to embed forms on any site
Mailvio offers a straightforward process for embedding signup forms on various platforms, allowing you to seamlessly integrate your email marketing efforts. In this guide, we will walk you through the steps to embed signup forms using Mailvio. Step ...
Mailvio integration with Digioh
What Digioh do? Digioh allows you to easily build email capture forms, surveys, preference centers, and landing pages integrated with Mailvio. Digioh offers hundreds of form themes and supports multi-step forms, capturing phone numbers, and forms ...
Mailvio integration with Convertful
What Convertful do? Convertful is an on-site conversion tool that enables marketers to create and target personalized offers based on a visitor's segment and stage using a range of tools like a sign-up forms editor, responsive templates, advanced ...
How to embed forms on a Kyvio 3 funnel
In this guide, we will walk you through the steps to link your Mailvio forms or Mailvio Optin signup forms to Kyvio 3. Please note that Kyvio 3 currently only accepts simple HTML forms. Before proceeding, ensure that you are logged into both your ...