diff --git a/src/components/deploy/FeaturePageHero.js b/src/components/deploy/FeaturePageHero.js
index 0bc6fbc6..3610785a 100644
--- a/src/components/deploy/FeaturePageHero.js
+++ b/src/components/deploy/FeaturePageHero.js
@@ -1,7 +1,7 @@
import React from 'react';
import { Grid } from '../grid/Grid';
import styles from './FeaturePageHero.module.css';
-import { LeadForm } from '../lead-form/LeadForm';
+import { SignupForm } from '../signup-form/SignupForm';
export default ({ h1, summary, leadFormId }) => (
@@ -11,7 +11,7 @@ export default ({ h1, summary, leadFormId }) => (
{h1}
{summary}
-
+
diff --git a/src/components/lead-form/LeadForm.js b/src/components/lead-form/LeadForm.js
index 7707ea92..28912818 100644
--- a/src/components/lead-form/LeadForm.js
+++ b/src/components/lead-form/LeadForm.js
@@ -3,7 +3,7 @@ import { navigate } from 'gatsby'
import cn from 'classnames';
import styles from './LeadForm.module.css';
import buttonStyles from '../buttons/Button.module.css';
-import { submitHubspotForm, HUBSPOT_FORM_DEMO } from '../../lib/hubspot.js';
+import { submitHubspotForm, HUBSPOT_FORM_HIPAA_GUIDE } from '../../lib/hubspot.js';
export const LeadForm = ({
id,
@@ -26,7 +26,7 @@ export const LeadForm = ({
};
const onSubmit = () => {
- const result = submitHubspotForm(HUBSPOT_FORM_DEMO, email, true);
+ const result = submitHubspotForm(HUBSPOT_FORM_HIPAA_GUIDE, email, true);
if (!result.ok) {
setError(result.message);
return;
diff --git a/src/components/signup-form/SignupForm.js b/src/components/signup-form/SignupForm.js
index 347861f9..dfbc6db1 100644
--- a/src/components/signup-form/SignupForm.js
+++ b/src/components/signup-form/SignupForm.js
@@ -1,68 +1,41 @@
-import React, { useState } from 'react';
+import React from 'react';
import cn from 'classnames';
import styles from './SignupForm.module.css';
import buttonStyles from '../buttons/Button.module.css';
-import { submitHubspotForm, HUBSPOT_FORM_PRODUCT_SIGNUP } from '../../lib/hubspot.js';
+import { analytics } from '../../lib/aptible';
+import Button from '../buttons/Button';
export const SignupForm = ({
- id,
btnText = 'Sign Up For Free',
- inputPlaceholder = 'Enter your email',
- allowPersonalEmails = true,
- onSuccess = () => { },
+ theme = '',
+ size = '',
}) => {
- const [submitted, setSubmitted] = useState(false);
- const [email, setEmail] = useState('');
- const [error, setError] = useState('');
+ const onSubmit = () => {
+ let url = 'https://dashboard.aptible.com/signup';
+ const utms = analytics.allUtmVars();
- const onKeypress = (e) => {
- if (e.key === 'Enter') {
- onSubmit();
- }
- };
+ if (Object.keys(utms).length > 0) {
+ const params = [];
+ for (let param in utms) {
+ params.push(`${param}=${utms[param]}`);
+ }
- const onSubmit = () => {
- const result = submitHubspotForm(HUBSPOT_FORM_PRODUCT_SIGNUP, email, allowPersonalEmails);
- if (!result.ok) {
- setError(result.message);
- return;
+ url += `?${params.join('&')}`;
}
- setSubmitted(true);
- setError('');
- onSuccess();
-
- // Give time for HubSpot & analytics to fire
- setTimeout(() => {
- window.location = `https://dashboard.aptible.com/signup?email=${encodeURIComponent(email)}`;
- }, 250);
+ window.location = url;
};
return (
-
-
- setEmail(e.target.value)}
- type="email"
- placeholder={inputPlaceholder}
- />
-
-
-
{error ? error : ''}
-
+ {btnText}
+
);
};
diff --git a/src/components/signup/SignupButton.js b/src/components/signup/SignupButton.js
index 3e45ad9c..090ca1ce 100644
--- a/src/components/signup/SignupButton.js
+++ b/src/components/signup/SignupButton.js
@@ -1,38 +1,14 @@
import React from 'react';
-import Button from '../buttons/Button';
-import Signup from '../signup/Signup';
-
-class SignupButton extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- open: false,
- };
- }
-
- openForm() {
- this.setState({ open: true });
- }
-
- closeForm() {
- this.setState({ open: false });
- }
-
- render() {
- return (
- <>
-
-
- {this.state.open && this.closeForm()} />}
- >
- );
- }
-}
-
-export default SignupButton;
+import SignupForm from '../signup-form';
+
+const SignupButton = ({
+ text = 'Sign Up For Free',
+ theme = '',
+ size = '',
+}) => {
+ return (
+
+ );
+};
+
+export default SignupButton
diff --git a/src/html.js b/src/html.js
index a3982cf8..fc9a2e95 100644
--- a/src/html.js
+++ b/src/html.js
@@ -64,14 +64,6 @@ export default function HTML(props) {
dangerouslySetInnerHTML={{ __html: props.body }}
/>
{props.postBodyComponents}
-
-