Adding the installation code to your website allows you to incorporate a popup form widget that opens directly on the webpage.
Once the the popup installation code has been added to your site
Once the installation code has been added to the head of your website, the popup form can be triggered. The popup form can be triggered for each campaign either by URL snippet, or by custom button via the share modal within the Campaigns Page in the portal. You can learn how to create the popup modal (once you complete the install code steps in this article) here.
Step 1: Copy the Install Code
Your installation code can be found on the installation page in your portal, and is also listed below.
<!-- DNPL begin -->
<link rel="stylesheet" href="https://dnpl.bgenerous.com/sdk/1.0.0/style.min.css" />
<!-- DNPL end -->
This code should be installed in the <Head> section of your website.
Step 2: Paste the Code to the <head> of Your Website
Paste the code into the <head> of your website.
Once you've completed this step, you can use the "Website Popup Link." to open pup-up forms on your website.
The specific procedures for completing this step depend on what platform your website is hosted on.
Platform Specific Instructions:
WordPress: Instructions for Adding the Install Code to a Wordpress Site
⚠️ Note: You will need to have admin level access to your Wordpress dashboard, which includes access to add plugins and modify themes. If you work with a third party website developer, you may need to request this access from them to complete this step.
If your WordPress website already has a method for adding code to the <head> area of your WordPress website on all pages, paste in the code using that method.
If not, you can use a plugin for inserting header and footer scripts onto your WordPress site.
Plugins can be installed on WordPress by going to the Plugins menu in the left-hand navigation of your Wordpress dashboard.
Plugins for adding code to a Wordpress Site:
Download one of the plugins mentioned above, and paste the code to your site's head section using the plugin.
If your site uses a Content Security Policy (learn more) and you're having trouble with this code, you may need to update this policy for the code to work correctly.
Instructions for Adding the Code to a Squarespace Website:
In Squarespace Home Menu, click Settings, click Advanced, and then click Code Injection. Note that this feature is only available for Business and Commerce plans only.
In the Header field, paste the code. Click Save.
Instructions for Adding the Code to a Wix Website:
- Go to your Wix website's dashboard
- Go to Settings
- Click the Custom Code tab in the Advanced section.
- Click + Add Custom Code at the top right.
- Paste the code snippet in the text box.
- Enter a name for your code, like "B Generous"
- Select the "All Pages" option under Add Code to Pages. Select the option to load the code on each page your visitor visits.
- under Place Code in, add your code to the "Head"
- Click Apply.
Step 3: Add Popup Forms To Your Site
Once the install code has been added to your site,
You can open popup forms on your site using the "popup link" that can be copied from your portal. Simply copy the popup link from your portal, and paste it at the end of any page link from your site.
This should trigger a popup to open on your site.
For a more detailed description of how to add these links to your website, read this guide to Learn how to add popups forms to your site.