{"id":87308,"date":"2020-11-04T12:52:45","date_gmt":"2020-11-04T17:52:45","guid":{"rendered":"https:\/\/optinmonster.com\/?post_type=optinmonster_docs&#038;p=87308"},"modified":"2025-07-31T13:49:25","modified_gmt":"2025-07-31T17:49:25","slug":"how-to-integrate-optinmonster-with-drupal","status":"publish","type":"optinmonster_docs","link":"https:\/\/optinmonster.com\/docs\/how-to-integrate-optinmonster-with-drupal\/","title":{"rendered":"How to Integrate OptinMonster with Drupal 7"},"content":{"rendered":"\n<p>OptinMonster works on any website where you can add our embed code, including Drupal 7.<\/p>\n\n\n\n<p>In this article, you\u2019ll learn how to integrate OptinMonster with Drupal 7.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Before You Start<\/h2>\n\n\n\n<p>Here are some things to know before you begin:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This guide is specifically for <strong>Drupal 7<\/strong>. We also have a <a href=\"https:\/\/optinmonster.com\/docs\/how-to-integrate-optinmonster-with-drupal-8\/\" target=\"_blank\" rel=\"noopener\" title=\"\">guide for Drupal 8<\/a>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"Embed_SiteWide\" class=\"ez-toc-section\"><\/span>Integrate with Drupal<\/h2>\n\n\n\n<p>After you\u2019ve&nbsp;<a href=\"https:\/\/optinmonster.com\/docs\/creating-your-first-optin\/\" target=\"_blank\" rel=\"noopener\" title=\"\">created a campaign<\/a> in OptinMonster, you\u2019ll want to embed it on your Drupal site.<\/p>\n\n\n\n<p>To add the embed code to your Drupal site, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the OptinMonster campaign builder, navigate to the&nbsp;<strong>Publish<\/strong> view and copy the Global Embed code.<br><img decoding=\"async\" width=\"620\" height=\"342\" class=\"alignnone size-full wp-image-151149\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2020\/09\/publish-screen-copy-embed-code.jpg\" alt=\"Copy the embed code for your OptinMonster campaign from the Publish screen of the campaign builder.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2020\/09\/publish-screen-copy-embed-code.jpg 620w, https:\/\/optinmonster.com\/wp-content\/uploads\/2020\/09\/publish-screen-copy-embed-code-300x165.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/li>\n\n\n\n<li>Next, log into your Drupal site and navigate to the&nbsp;<strong>Structure<\/strong> page from the admin menu.<br><img decoding=\"async\" width=\"800\" height=\"409\" class=\"alignnone wp-image-87311 size-large\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-structure-link-1024x523.jpg\" alt=\"You'll need to navigate to the Structure settings of your Drupal site to begin adding OptinMonster.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-structure-link-1024x523.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-structure-link-300x153.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>In the modal window that appears select&nbsp;<strong>Blocks<\/strong>.<br><img decoding=\"async\" width=\"800\" height=\"273\" class=\"alignnone wp-image-87312 size-large\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-blocks-1024x349.jpg\" alt=\"You can add your OptinMonster embed code to a block in Drupal.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-blocks-1024x349.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-blocks-300x102.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>Next, select&nbsp;<strong>Add block<\/strong>.<br><img decoding=\"async\" width=\"800\" height=\"447\" class=\"alignnone wp-image-87318 size-large\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-add-block-1024x572.jpg\" alt=\"From the Blocks modal view you'll need to select Add Block to add a new OptinMonster embed to your site.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-add-block-1024x572.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-add-block-300x168.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>Complete the following steps when adding your block:\n<ol class=\"wp-block-list\">\n<li>Enter a&nbsp;<strong>Block description<\/strong>&nbsp;to easily identify from the admin.<\/li>\n\n\n\n<li>Paste the OptinMonster embed code you copied earlier into the&nbsp;<strong>Block body<\/strong> field.<\/li>\n\n\n\n<li>Select&nbsp;<strong>Full HTML<\/strong> from the text format dropdown.<\/li>\n\n\n\n<li>In the Region Settings section, you&#8217;ll want to add your block to the&nbsp;<strong>footer<\/strong> of your site by selecting that option from the theme dropdown.<\/li>\n\n\n\n<li><em>(Optional)<\/em>&nbsp;You can control the&nbsp;<strong>Visibility<\/strong> of your campaign based on page, content type, and even user.<\/li>\n\n\n\n<li>When you&#8217;re finished, click<strong> Save block<\/strong>.<br><img decoding=\"async\" width=\"800\" height=\"447\" class=\"alignnone wp-image-87314 size-large\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-block-settings-1024x572.jpg\" alt=\"When adding your Drupal block, there are specific settings you'll want to set when embedding OptinMonster.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-block-settings-1024x572.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-block-settings-300x168.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><br><img decoding=\"async\" width=\"800\" height=\"447\" class=\"alignnone wp-image-87315 size-large\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-block-settings2-1024x572.jpg\" alt=\"You can control the visibility of your optin when creating your Drupal Block.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-block-settings2-1024x572.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-block-settings2-300x168.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Once the block is saved and you return to the list of Blocks, scroll down to the Footer section and locate your new block. If you need to modify any settings in the future you can do so by selecting the&nbsp;<strong>Configure<\/strong> link.<br><img decoding=\"async\" width=\"800\" height=\"432\" class=\"alignnone wp-image-87319 size-large\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-saved-block-1024x553.jpg\" alt=\"You can locate your saved block under the Footer section and modify it's settings later.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-saved-block-1024x553.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/04\/drupal-saved-block-300x162.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n<\/ol>\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">Troubleshooting<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\">What domain do I enter when creating my campaign?<\/h5>\n\n\n\n<p>You&#8217;ll want to add the domain that appears in the address bar when you view your website.<\/p>\n\n\n\n<p>If you haven&#8217;t registered the domain you want to use in your OptinMonster account yet, you can&nbsp;add the site through the&nbsp;<strong>Publish<\/strong> screen in the campaign builder, or through the&nbsp;<strong>Account &gt; Sites<\/strong> screen. Learn more about <a href=\"https:\/\/optinmonster.com\/docs\/how-to-add-edit-or-delete-a-website-in-optinmonster\/\" target=\"_blank\" rel=\"noopener\" title=\"\">how to register your domain in OptinMonster<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the <strong>Publish<\/strong> view of the campaign builder, be sure the domain is listed under the&nbsp;<strong>Websites<\/strong> section. Click&nbsp;<strong>Add a website<\/strong> if your domain isn&#8217;t already assigned to the campaign to select and add it.<br><img decoding=\"async\" width=\"850\" height=\"653\" class=\"alignnone size-full wp-image-151150\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2020\/09\/5f6cf6500e9be381063831.gif\" alt=\"Add site to the Publish screen for your OptinMonster campaign.\"><\/li>\n\n\n\n<li>When you&#8217;re finished, click <strong>Save<\/strong>.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>OptinMonster works on any website where you can add our embed code, including Drupal 7. In this article, you\u2019ll learn how to integrate OptinMonster with Drupal 7. Before You Start Here are some things to know before you begin: Integrate with Drupal After you\u2019ve&nbsp;created a campaign in OptinMonster, you\u2019ll want to embed it on your&nbsp;&hellip;<\/p>\n","protected":false},"author":4657,"comment_status":"open","ping_status":"closed","template":"","documentation\/categories":[210],"documentation\/tags":[31399,31430,31411,31418],"class_list":["post-87308","optinmonster_docs","type-optinmonster_docs","status-publish","hentry","categories-platforms"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/87308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/types\/optinmonster_docs"}],"author":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/users\/4657"}],"replies":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/comments?post=87308"}],"version-history":[{"count":6,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/87308\/revisions"}],"predecessor-version":[{"id":197672,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/87308\/revisions\/197672"}],"wp:attachment":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/media?parent=87308"}],"wp:term":[{"taxonomy":"categories","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/categories?post=87308"},{"taxonomy":"internal_tags","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/tags?post=87308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}