All Collections
Launching your campaign
CampaignNow on your NationBuilder site
CampaignNow on your NationBuilder site

Five steps to add your campaign code to your NationBuilder site

Sly Verano avatar
Written by Sly Verano
Updated over a week ago

1. Create a new page in NationBuilder

To add a campaign to your NationBuilder site, you must first create a new page through the "websites" section of your NationBuilder control panel. CampaignNow forms can be added to all types of NationBuilder pages. We recommend using basic pages or petition pages for this purpose. It is best to create the page with the status "unlisted", which hides it from search engines and website visitors but allows you to preview the page at its direct URL.

2. Copy your CampaignNow form

Next you need to copy the HTML code from the fourth step in the campaign creation process (the step titled "Get the Code"). Copy the entire contents of the "code" box in the left hand column of that page as shown in the screenshot below.

3. Create a custom template for your new page

In NationBuilder, navigate to the "template" tab and click the button to "create a custom template":

This will allow you to edit one specific page's template. If you're interested, you can read more about creating page-specific templates on NationBuilder's own support site.

4. Paste your CampaignNow code into your custom page template

Finally, you need to paste the code that you copied in step 2 into the custom page-specific template you created in step 3. The specific line in the code editor where
you should paste your new CampaignNow form depends on a number of factors including:

  • The page type you have chosen to create

  • Your NationBuilder theme (whether it is a public theme or custom theme).

  • The desired layout for the page (e.g. whether the form should appear above or below the main content of the page).

Our example screenshot below demonstrates a good place to paste your CampaignNow form on a basic page so it appears below the main text and image content. Please note the exact lines in the code may vary depending on your theme:

Once you've inserted the code, click the "Save and publish changes" button at the bottom of the page. This will publish the changes to the custom template, but won't have any impact on whether the page itself is published.

5. Review your CampaignNow form and publish your new page

Navigate to your new page by clicking on the URL visible in the NationBuilder backend. You should see your form appear directly below your main text and image content.

If you need to make any changes at this point, you can return to step 4 and adjust the location in the template where you pasted your CampaignNow code.

Once you're ready to launch your campaign, you can publish the page and start promoting it to your supporters.

Did this answer your question?