{"id":948,"date":"2019-12-17T14:31:51","date_gmt":"2019-12-17T13:31:51","guid":{"rendered":"http:\/\/www.earlyparrot.com\/support\/?post_type=kbe_knowledgebase&#038;p=948"},"modified":"2019-12-19T18:51:59","modified_gmt":"2019-12-19T17:51:59","slug":"earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page","status":"publish","type":"kbe_knowledgebase","link":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/","title":{"rendered":"EarlyParrot subscribe call API on a Kartra opt-in page"},"content":{"rendered":"\n<p class=\"has-background has-very-light-gray-background-color\"><em>Before we proceed &#8211; don&#8217;t want to integrate EarlyParrot yourself? Don&#8217;t have the resources to do or simply wish to have us set it up for you? <strong>We offer a done for you service, at a very reasonable price<\/strong>. Send us a request on support@earlyparrot.com with your domain for further instructions.<\/em><\/p>\n\n\n\n<p>For most EarlyParrot \/ Kartra users, the\u00a0<strong>opt-in page\u00a0<\/strong>is the same page as the landing page, which is also most of the time the homepage. This guide will show you how to install the right scripts that will capture subscriber information and send it to EarlyParrot for processing. <\/p>\n\n\n\n<p>The provided script will send <strong>Firstname (OPTIONAL), Lastname (OPTIONAL) and Email (mandatory)<\/strong> to EarlyParrot. This will:<\/p>\n\n\n\n<ul><li>Add a new subscriber to your referral campaign<\/li><li>Gives enough information to EarlyParrot to be able to decide whether the new opt-in has been referred or not.<\/li><\/ul>\n\n\n\n<p>To get this script integrated, locate the opt-in page in your Kartra account. Once you do that, then add the following script in a custom HTML element.  <\/p>\n\n\n\n<p>Please make sure you replace <strong>YOUR_CAMPAIGN_ID<\/strong> with your campaign id. <a href=\"https:\/\/www.earlyparrot.com\/support\/kb\/how-to-get-your-earlyparrot-campaign-id\/\">Not sure how to get your campaign ID? check this tutorial out.<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script type=\"text\/javascript\">\n  var epVars = {\n    adminUrl: \"https:\/\/admin.earlyparrot.com\",\n    appUrl: \"https:\/\/app.earlyparrot.com\",\n    campaignId: \"YOUR_CAMPAIGN_ID\"\n};\n&lt;\/script>\n\n&lt;script type=\"text\/javascript\" async=\"true\" src=\"https:\/\/s3.amazonaws.com\/earlyparrot-production-scripts\/ep-landing-page.js\">&lt;\/script>\n\n&lt;script type=\"text\/javascript\">\n  function enableCaptureOnSubmit () {\n      var firstName = epJQuery('input&#91;name=\"first_name\"]').val(); \n      var email = epJQuery('input&#91;name=\"email\"]').val();\n      if (undefined === firstName || undefined === email) {\n        return;\n      }\n      if (\"\" == firstName || \"\" == email) {\n        return;\n      }\n      var ep_subscribeObj = new Object();\n      ep_subscribeObj.firstName = firstName;\n      ep_subscribeObj.lastName = ' ';\n      ep_subscribeObj.email = email;\n      ep_subscribeObj.rh = Cookies.get('rh');\n      ep_subscribeObj.sendWelcomeImmediately = 0; \/\/will not send welcome email \n      Cookies.set('epSubmitEmail', ep_subscribeObj.email, { domain: window.location.hostname });\n      epJQuery.post(\"https:\/\/admin.earlyparrot.com\/api\/campaigns\/\"+epVars.campaignId+\"\/subscribe\", ep_subscribeObj)\n          .then(function(data) { });\n  }\n\n(function(w, d, url) {\n    var headElementUtils = d.getElementsByTagName('head')&#91;0];\n    var scriptElementUtils = d.createElement('script');\n    scriptElementUtils.addEventListener('load', function() {\n        epJQuery(document).ready(function() {\n            epJQuery(\"button&#91;type='submit'].kartra_optin_submit_btn\").click(enableCaptureOnSubmit)\n        });\n    });\n    headElementUtils.async = 1;\n    scriptElementUtils.src = url\n    headElementUtils.appendChild(scriptElementUtils);\n})(window, document, 'https:\/\/s3.amazonaws.com\/earlyparrot-production-scripts\/utilities.js');\n&lt;\/script><\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before we proceed &#8211; don&#8217;t want to integrate EarlyParrot yourself? Don&#8217;t have the resources to do or simply wish to have us set it up for you? We offer a done for you service, at a very reasonable price. Send us a request on support@earlyparrot.com with your domain for further instructions. For most EarlyParrot \/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","kbe_taxonomy":[],"kbe_tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>EarlyParrot subscribe call API on a Kartra opt-in page<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EarlyParrot subscribe call API on a Kartra opt-in page\" \/>\n<meta property=\"og:description\" content=\"Before we proceed &#8211; don&#8217;t want to integrate EarlyParrot yourself? Don&#8217;t have the resources to do or simply wish to have us set it up for you? We offer a done for you service, at a very reasonable price. Send us a request on support@earlyparrot.com with your domain for further instructions. For most EarlyParrot \/ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/\" \/>\n<meta property=\"og:site_name\" content=\"EarlyParrot Support\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-19T17:51:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.earlyparrot.com\/support\/#organization\",\"name\":\"EarlyParrot\",\"url\":\"https:\/\/www.earlyparrot.com\/support\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.earlyparrot.com\/support\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.earlyparrot.com\/support\/wp-content\/uploads\/2022\/02\/parrot.png\",\"contentUrl\":\"https:\/\/www.earlyparrot.com\/support\/wp-content\/uploads\/2022\/02\/parrot.png\",\"width\":1500,\"height\":1774,\"caption\":\"EarlyParrot\"},\"image\":{\"@id\":\"https:\/\/www.earlyparrot.com\/support\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.earlyparrot.com\/support\/#website\",\"url\":\"https:\/\/www.earlyparrot.com\/support\/\",\"name\":\"EarlyParrot Support\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.earlyparrot.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.earlyparrot.com\/support\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/#webpage\",\"url\":\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/\",\"name\":\"EarlyParrot subscribe call API on a Kartra opt-in page\",\"isPartOf\":{\"@id\":\"https:\/\/www.earlyparrot.com\/support\/#website\"},\"datePublished\":\"2019-12-17T13:31:51+00:00\",\"dateModified\":\"2019-12-19T17:51:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.earlyparrot.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledgebase\",\"item\":\"https:\/\/www.earlyparrot.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"EarlyParrot subscribe call API on a Kartra opt-in page\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EarlyParrot subscribe call API on a Kartra opt-in page","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/","og_locale":"en_US","og_type":"article","og_title":"EarlyParrot subscribe call API on a Kartra opt-in page","og_description":"Before we proceed &#8211; don&#8217;t want to integrate EarlyParrot yourself? Don&#8217;t have the resources to do or simply wish to have us set it up for you? We offer a done for you service, at a very reasonable price. Send us a request on support@earlyparrot.com with your domain for further instructions. For most EarlyParrot \/ [&hellip;]","og_url":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/","og_site_name":"EarlyParrot Support","article_modified_time":"2019-12-19T17:51:59+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.earlyparrot.com\/support\/#organization","name":"EarlyParrot","url":"https:\/\/www.earlyparrot.com\/support\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/www.earlyparrot.com\/support\/#logo","inLanguage":"en-US","url":"https:\/\/www.earlyparrot.com\/support\/wp-content\/uploads\/2022\/02\/parrot.png","contentUrl":"https:\/\/www.earlyparrot.com\/support\/wp-content\/uploads\/2022\/02\/parrot.png","width":1500,"height":1774,"caption":"EarlyParrot"},"image":{"@id":"https:\/\/www.earlyparrot.com\/support\/#logo"}},{"@type":"WebSite","@id":"https:\/\/www.earlyparrot.com\/support\/#website","url":"https:\/\/www.earlyparrot.com\/support\/","name":"EarlyParrot Support","description":"","publisher":{"@id":"https:\/\/www.earlyparrot.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.earlyparrot.com\/support\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/#webpage","url":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/","name":"EarlyParrot subscribe call API on a Kartra opt-in page","isPartOf":{"@id":"https:\/\/www.earlyparrot.com\/support\/#website"},"datePublished":"2019-12-17T13:31:51+00:00","dateModified":"2019-12-19T17:51:59+00:00","breadcrumb":{"@id":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.earlyparrot.com\/support\/kb\/earlyparrot-subscribe-call-api-on-a-kartra-opt-in-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.earlyparrot.com\/support\/"},{"@type":"ListItem","position":2,"name":"Knowledgebase","item":"https:\/\/www.earlyparrot.com\/support\/kb\/"},{"@type":"ListItem","position":3,"name":"EarlyParrot subscribe call API on a Kartra opt-in page"}]}]}},"_links":{"self":[{"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/kbe_knowledgebase\/948"}],"collection":[{"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/kbe_knowledgebase"}],"about":[{"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/types\/kbe_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/comments?post=948"}],"version-history":[{"count":20,"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/kbe_knowledgebase\/948\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/kbe_knowledgebase\/948\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/media?parent=948"}],"wp:term":[{"taxonomy":"kbe_taxonomy","embeddable":true,"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/kbe_taxonomy?post=948"},{"taxonomy":"kbe_tags","embeddable":true,"href":"https:\/\/www.earlyparrot.com\/support\/wp-json\/wp\/v2\/kbe_tags?post=948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}