<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ActiveCampaign Blog &#187; subscription</title>
	<atom:link href="http://www.activecampaign.com/blog/tag/subscription/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.activecampaign.com/blog</link>
	<description>ActiveCampaign - Development, PHP, Programming &#38; More...</description>
	<lastBuildDate>Mon, 26 Jul 2010 21:15:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subscription Form integration using the API</title>
		<link>http://www.activecampaign.com/blog/subscription-form-integration-using-the-api/</link>
		<comments>http://www.activecampaign.com/blog/subscription-form-integration-using-the-api/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:33:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[subscription]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=561</guid>
		<description><![CDATA[Subscription Forms are excellent ways to promote your newsletter on any website, even Facebook and WordPress sites.
It&#8217;s often tiresome to have to manually update every webpage that you have embedded subscription form HTML on, when any changes are made to the form.
A unique idea might be to use our email marketing API to display a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-top:15px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.activecampaign.com%2Fblog%2Fsubscription-form-integration-using-the-api%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.activecampaign.com%2Fblog%2Fsubscription-form-integration-using-the-api%2F" height="61" width="51" /></a></div><p>Subscription Forms are excellent ways to promote your newsletter on any website, even <a href="http://www.activecampaign.com/blog/integrate-subscription-forms-with-facebook-pages/">Facebook</a> and <a href="http://www.activecampaign.com/blog/email-marketing-wordpress-integration">WordPress sites</a>.</p>
<p>It&#8217;s often tiresome to have to manually update every webpage that you have embedded subscription form HTML on, when any changes are made to the form.</p>
<p>A unique idea might be to use our <a href="http://www.activecampaign.com/support/tt/index.php?action=kb&amp;article=506">email marketing API</a> to display a subscription form. This tutorial will briefly walk through how to use PHP and our API to display subscription forms. Then, when changes are made to the subscription form, you no longer have to update every instance of the form across the web!</p>
<p><span style="color: #ff0000"><em><strong>Note:</strong> Please be aware that doing this will cause repeated requests to the external domain, which can slow down sites, especially those with high traffic. This example, more or less, introduces how simple it is to use the API.</em></span></p>
<h2>Obtaining your subscription form ID</h2>
<p>First, visit your Subscription Form page in the admin section, and choose which form you want to display on an external website. Click the &#8220;View&#8221; link next to the subscription form name. Then note the unique number at the end of the URL (in this case, <strong>1001</strong>):</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_sub_form_api/ddhrcb9z_53c8662wdm_b.png" alt="Screenshot of ActiveCampaign email marketing software" width="552" height="395" /></p>
<p>This is the ID of the subscription form. We&#8217;ll use this in our API call.</p>
<h2>PHP</h2>
<p>In PHP, set up your script to make an API call using the <code>form_view</code> action:</p>
<pre class="brush: php; ">

// Base API path
$path = &quot;http://mysite.com/admin/api.php?&quot;;

// Initialize curl request
$request = curl_init($path . &quot;api_user=admin&amp;api_pass=test&amp;api_action=form_view&amp;api_output=serialize&amp;id=1001&amp;generate=1&quot;);

// Set other curl details
curl_setopt($request, CURLOPT_HEADER, 0);
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);

// Get the response
$response = (string)curl_exec($request);

// Close curl
curl_close($request);

// Set final result array to variable
$result = unserialize($response);
</pre>
<p>This will go out and obtain the information for form ID 1001, and set it to an array which we can reference easily.</p>
<h2>HTML</h2>
<p>Now you just need to write out the HTML for your subscription form:</p>
<pre class="brush: php; ">

echo $result[&quot;html&quot;];
</pre>
<p>That&#8217;s it! The entire HTML structure of the form can be obtained through a simple API call.</p>
<h2>Improvements</h2>
<p>If you have a few forms you want displayed on various spots around the web, it might be wise to write a function for yourself, so you don&#8217;t have to repeat the <span style="font-family: courier new,courier">curl</span> code for each form you display:</p>
<pre class="brush: php; ">

function ac_api_form_view_html($id)
{
	$path = &quot;http://mysite.com/admin/api.php?&quot;;

	$request = curl_init($path . &quot;api_user=admin&amp;api_pass=test&amp;api_action=form_view&amp;api_output=serialize&amp;id=&quot; . $id . &quot;&amp;generate=1&quot;);

	curl_setopt($request, CURLOPT_HEADER, 0);
	curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
	$response = (string)curl_exec($request);
	curl_close($request);
	$result = unserialize($response);

	if ($result[&quot;response_code&quot;])
	{
		return $result[&quot;html&quot;];
	}
}
</pre>
<p>Here&#8217;s how you&#8217;d call this function:</p>
<pre class="brush: php; ">

$form_html = ac_api_form_view_html(1001);

echo $form_html;
</pre>
<p>Two lines is not bad!</p>
<h2>Going further</h2>
<p>As mentioned at the beginning, using the API in this manner might result in slower site performance, since your script has to re-request the data each time the page is loaded. It might be wise to cache the subscription form HTML locally, then only re-fetch the updated data at a set interval, such as weekly.</p>
<p>Our <a href="http://www.activecampaign.com/email-marketing/extend-wordpress.php">Wordpress plugin</a> performs the same type of caching, if desired.</p>
<p>Let us know if you have any questions or suggestions for the API.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/subscription-form-integration-using-the-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email Marketing WordPress Integration</title>
		<link>http://www.activecampaign.com/blog/email-marketing-wordpress-integration/</link>
		<comments>http://www.activecampaign.com/blog/email-marketing-wordpress-integration/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:11:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Email Marketing]]></category>
		<category><![CDATA[email marketing software]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[subscription]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=575</guid>
		<description><![CDATA[Our email marketing software lets you embed subscription forms on other sites by simply copying and pasting HTML code.
To make things even easier, we&#8217;ve created a WordPress plugin that lets you display any subscription form on your WordPress site, with just a few clicks.

All of this happens without any copying and pasting. Simply supply your [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-top:15px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.activecampaign.com%2Fblog%2Femail-marketing-wordpress-integration%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.activecampaign.com%2Fblog%2Femail-marketing-wordpress-integration%2F" height="61" width="51" /></a></div><p>Our <a href="http://www.activecampaign.com/email-marketing/">email marketing software</a> lets you embed subscription forms on other sites by simply copying and pasting HTML code.</p>
<p>To make things even easier, we&#8217;ve created a WordPress plugin that lets you display any subscription form on your WordPress site, with just a few clicks.</p>
<p><img src="http://www.activecampaign.com/email-marketing/media/wp-screenshot-2.png" alt="Screenshot of ActiveCampaign email marketing WordPress plugin" /></p>
<p>All of this happens without any copying and pasting. Simply supply your email marketing software URL, and login information, and choose what form you&#8217;d like displayed.</p>
<p>The form will then appear in the sidebar of your WordPress site:</p>
<p><img src="http://www.activecampaign.com/email-marketing/media/wp-screenshot-4.png" alt="Screenshot of ActiveCampaign email marketing subscription form on WordPress site" /></p>
<p>It&#8217;s that simple!</p>
<p>You can even opt to request the updated form each time the page is loaded, so any changes you make to the form in your email marketing software will always be reflected!</p>
<p><strong><a href="http://www.activecampaign.com/email-marketing/extend-wordpress.php">Learn more about this plugin</a></strong>, and let us know if you have questions or suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/email-marketing-wordpress-integration/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Email Marketing With FaceBook</title>
		<link>http://www.activecampaign.com/blog/integrate-subscription-forms-with-facebook-pages/</link>
		<comments>http://www.activecampaign.com/blog/integrate-subscription-forms-with-facebook-pages/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 20:25:58 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Email Marketing]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[subscription]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=533</guid>
		<description><![CDATA[Our email marketing software allows you to embed subscription forms on any website. This provides the advantage of using our software back-end, in combination with your web presence front-end.
Subscription forms can be extracted as HTML, which can be placed on any site with minimal effort. This tutorial will explain how to embed subscription forms on [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-top:15px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.activecampaign.com%2Fblog%2Fintegrate-subscription-forms-with-facebook-pages%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.activecampaign.com%2Fblog%2Fintegrate-subscription-forms-with-facebook-pages%2F" height="61" width="51" /></a></div><p>Our <a href="http://activecampaign.com/email-marketing">email marketing software</a> allows you to embed subscription forms on any website. This provides the advantage of using our software back-end, in combination with your web presence front-end.</p>
<p>Subscription forms can be extracted as HTML, which can be placed on any site with minimal effort. This tutorial will explain how to embed subscription forms on <a href="http://www.facebook.com/advertising/?pages">Facebook pages</a> as custom content sections. Facebook pages often act as extensions of your product or brand in social network surroundings.</p>
<p><span id="more-533"></span></p>
<p>First, make sure you have a Facebook page set up for your product or brand. Then, visit the <a href="http://www.facebook.com/apps/application.php?id=4949752878&amp;ref=mf">Static FBML Facebook page</a> and click &#8220;Add to my Page.&#8221;</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/1.PNG" alt="Screenshot of Facebook page" width="214" height="141" /></p>
<p>Choose the page you&#8217;d like to add to:</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/2.PNG" alt="Screenshot of Facebook page" width="473" height="144" /></p>
<p>This will add the necessary component to your page, which will let you take advantage of extended functionality.</p>
<p>Back on your own Facebook page, click &#8220;Edit Page.&#8221;</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/3.PNG" alt="Screenshot of Facebook page" width="212" height="116" /></p>
<p>Scroll down to the section for <strong>FBML</strong> (under Applications), then click the pencil icon in the upper-right corner, and choose &#8220;Edit.&#8221;</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/4.PNG" alt="Screenshot of Facebook page settings" width="709" height="117" /></p>
<p>This will provide you a form to edit the <strong>Box Title</strong> and content of the custom section. Provide a unique Box Title and body content for your section. Then we&#8217;ll add the subscription form HTML.</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/5.PNG" alt="Screenshot of Facebook page settings" width="604" height="157" /></p>
<p>Back in our email marketing software, go to <strong>Integration &gt; Subscription Forms</strong>, and choose a form to use on your Facebook page. It&#8217;s probably best to exclude all input fields besides email address, for the sake of space (the area where the subscription form will appear is limited in size).</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/6.PNG" alt="Screenshot of ActiveCampaign email marketing software" width="399" height="454" /></p>
<p>Get the code for this subscription form by hitting &#8220;Update &amp; Continue.&#8221;</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/7.PNG" alt="Screenshot of ActiveCampaign email marketing software" width="522" height="305" /></p>
<p>Go back into the Facebook settings for you page, and paste the code into the FBML content area:</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/8.PNG" alt="Screenshot of Facebook page settings" width="385" height="257" /></p>
<p>Hit <strong>Save Changes</strong>, and you&#8217;re set!</p>
<p>Your new content section will now appear under the <strong>Boxes </strong>tab on your page:</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/9.PNG" alt="Screenshot of Facebook page" width="431" height="178" /></p>
<p>This is probably not the most ideal spot for your subscription form to reside, since many viewers may not visit the individual Boxes tab. A better spot would be on the main page, along the left side of the &#8220;wall.&#8221; To do this, click on the pencil icon in the upper-right corner of the Newsletter box, and choose &#8220;Move to Wall tab.&#8221;</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/10.PNG" alt="Screenshot of Facebook page" width="577" height="135" /></p>
<p>This will neatly place your subscription form on your main Facebook page, along the left-hand column:</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/11.PNG" alt="Screenshot of Facebook page" width="214" height="150" /></p>
<p>You&#8217;re all set!</p>
<p>One last thing you might consider is the redirection process. Once a user submits the form, they will be taken to your email marketing software site, and out of the Facebook interface. This could be an interruption to the user who may have wished to remain on the Facebook site.</p>
<p>To provide a better experience, adjust the redirection settings for your subscription form. Have the &#8220;Successful Subscription&#8221; option redirect to your Facebook page URL:</p>
<p><img src="http://www.mykbsite.com/email-marketing/userimages/article_subscription_form_facebook_integration/12.PNG" alt="Screenshot of ActiveCampaign email marketing software" width="571" height="120" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/integrate-subscription-forms-with-facebook-pages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
