{"id":89377,"date":"2022-05-27T14:48:44","date_gmt":"2022-05-27T18:48:44","guid":{"rendered":"https:\/\/optinmonster.com\/?post_type=optinmonster_docs&#038;p=89377"},"modified":"2025-07-21T14:32:14","modified_gmt":"2025-07-21T18:32:14","slug":"how-to-add-optinmonster-to-any-website","status":"publish","type":"optinmonster_docs","link":"https:\/\/optinmonster.com\/docs\/how-to-add-optinmonster-to-any-website\/","title":{"rendered":"How to Add OptinMonster to Any Website"},"content":{"rendered":"\n<p>OptinMonster can work with any&nbsp;website. The best lead generation tool works on custom CMS&nbsp;sites&nbsp;too.<\/p>\n\n\n\n<p>In this article, you&#8217;ll learn how to add OptinMonster to any website.<\/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>We also have&nbsp;<a href=\"https:\/\/optinmonster.com\/categories\/docs\/platforms\/\" target=\"_blank\" rel=\"noopener\" title=\"\">specific guides for adding OptinMonster to the most popular website platforms<\/a>.<\/li>\n\n\n\n<li>If your site is built on WordPress, follow our <a href=\"https:\/\/optinmonster.com\/docs\/how-to-install-the-optinmonster-wordpress-plugin\/\" target=\"_blank\" rel=\"noopener\" title=\"\">guide for installing the OptinMonster for WordPress plugin<\/a>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Embed OptinMonster<\/h2>\n\n\n\n<p>To locate your OptinMonster embed code, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>From the OptinMonster dashboard,&nbsp;<a href=\"https:\/\/app.optinmonster.com\/account\/\" target=\"_blank\" rel=\"noopener\">navigate to the&nbsp;<strong>Account<\/strong>&nbsp;page<\/a>. You can access this page by clicking on your&nbsp;<strong>Account Name<\/strong>&nbsp;in the top right corner, then select&nbsp;<strong>My Account<\/strong> from the dropdown menu.<br><img decoding=\"async\" width=\"800\" height=\"486\" class=\"alignnone size-large wp-image-171355\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/dashboard-account-name-my-account-1024x622.png\" alt=\"\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/dashboard-account-name-my-account-1024x622.png 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/dashboard-account-name-my-account-300x182.png 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/dashboard-account-name-my-account-768x466.png 768w, https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/dashboard-account-name-my-account.png 1362w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>Scroll down to the Account-wide Embed Code area. Copy the code in the box.<br><img decoding=\"async\" width=\"800\" height=\"256\" class=\"alignnone size-large wp-image-171354\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/account-copy-embed-code-1024x328.png\" alt=\"\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/account-copy-embed-code-1024x328.png 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/account-copy-embed-code-300x96.png 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/account-copy-embed-code-768x246.png 768w, https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/account-copy-embed-code.png 1244w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><br><\/li>\n<\/ol>\n\n\n\n<div class=\"alert-box alert-yellow\">\n<p class=\"alert-box-title\"><\/p>\n\n\n\n<p>If you have already <a href=\"https:\/\/optinmonster.com\/docs\/creating-your-first-optin\/\" target=\"_blank\" rel=\"noopener\" title=\"\">created a campaign<\/a> in OptinMonster, you can also find your account-wide (aka Global) embed code on the <strong>Publish<\/strong> view of the campaign builder, under Platform &gt; Any Site.<br><img decoding=\"async\" width=\"800\" height=\"579\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2022\/05\/publish-copy-embed-code-1024x741.png\" alt=\"\"><\/p>\n\n\n\n<p class=\"is-style-arrow-link has-link-color\"><\/p>\n<\/div>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Paste the embed code into your site template file just before the closing <code><code>&lt;\/body&gt;<\/code><\/code> tag.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Example<\/h2>\n\n\n\n<p>In this example, we&#8217;re editing the index.html file. <strong>Note:&nbsp;<\/strong>Your own site may use a different file naming convention, use file snippets, or use an interface option for adding embed codes.<\/p>\n\n\n\n<p>Paste the embed code you previously copied just before the closing <code>&lt;\/body&gt;<\/code> tag of your HTML file. Save the changes to your file and upload it to your site.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/05\/saas-html-embed-code-1024x515.jpg\" alt=\"You can paste the embed code into your HTML file near the closing body tag.\" class=\"wp-image-87768\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/05\/saas-html-embed-code-1024x515.jpg 1024w, https:\/\/optinmonster.com\/wp-content\/uploads\/2015\/05\/saas-html-embed-code-300x151.jpg 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n","protected":false},"excerpt":{"rendered":"<p>OptinMonster can work with any&nbsp;website. The best lead generation tool works on custom CMS&nbsp;sites&nbsp;too. In this article, you&#8217;ll learn how to add OptinMonster to any website. Before You Start Here are some things to know before you begin: Embed OptinMonster To locate your OptinMonster embed code, follow these steps: Example In this example, we&#8217;re editing&nbsp;&hellip;<\/p>\n","protected":false},"author":10743,"comment_status":"open","ping_status":"closed","template":"","documentation\/categories":[210],"documentation\/tags":[31399,31430,31411,31418],"class_list":["post-89377","optinmonster_docs","type-optinmonster_docs","status-publish","hentry","categories-platforms"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/89377","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\/10743"}],"replies":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/comments?post=89377"}],"version-history":[{"count":20,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/89377\/revisions"}],"predecessor-version":[{"id":205508,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/89377\/revisions\/205508"}],"wp:attachment":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/media?parent=89377"}],"wp:term":[{"taxonomy":"categories","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/categories?post=89377"},{"taxonomy":"internal_tags","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/tags?post=89377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}