-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate email subscription form to ConvertKit #8
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5d17cf7
Add minimal ConverKit embed (as-is copy-paste)
yanirs e5faa7b
Remove ConvertKit branding and reformat
yanirs a096890
Move into mailing list container
yanirs b701af9
Reformat
yanirs be12f10
Remove inline styling and mailchimp form
yanirs ac0d7ff
Improve styling and remove superfluous classes
yanirs 5db71e4
Improve diff
yanirs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,32 @@ | |
</a> | ||
|
||
<div class="mailing-list-container"> | ||
<script src="https://f.convertkit.com/ckjs/ck.5.js"></script> | ||
<form | ||
class="mailing-list" | ||
action="https://yanirseroussi.us17.list-manage.com/subscribe/post?u=3c08aa3ff27dd92978019febd&id=bc3ab705af" | ||
class="mailing-list seva-form formkit-form" | ||
action="https://app.convertkit.com/forms/6549537/subscriptions" | ||
method="post" | ||
target="_blank" | ||
novalidate | ||
data-sv-form="6549537" | ||
data-uid="9157759fce" | ||
data-format="inline" | ||
data-version="5" | ||
data-options="{"settings":{"after_subscribe":{"action":"message","success_message":"Success! Now check your email to confirm your subscription.","redirect_url":""},"analytics":{"google":null,"fathom":null,"facebook":null,"segment":null,"pinterest":null,"sparkloop":null,"googletagmanager":null},"modal":{"trigger":"timer","scroll_percentage":null,"timer":5,"devices":"all","show_once_every":15},"powered_by":{"show":true,"url":"https://convertkit.com/features/forms?utm_campaign=poweredby&utm_content=form&utm_medium=referral&utm_source=dynamic"},"recaptcha":{"enabled":false},"return_visitor":{"action":"show","custom_content":""},"slide_in":{"display_in":"bottom_right","trigger":"timer","scroll_percentage":null,"timer":5,"devices":"all","show_once_every":15},"sticky_bar":{"display_in":"top","trigger":"timer","scroll_percentage":null,"timer":5,"devices":"all","show_once_every":15}},"version":"5"}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So ugly. It's probably possible to make this human-readable by getting Hugo to HTML-encode the config JSON. Good enough for now, though. |
||
> | ||
<label for="mailing-list-email">Get new posts in your mailbox</label> | ||
<input type="text" name="EMAIL" id="mailing-list-email" placeholder="Email address" /> | ||
<div style="position: absolute; left: -5000px;" aria-hidden="true"> | ||
<input type="text" name="b_3c08aa3ff27dd92978019febd_bc3ab705af" tabindex="-1" value="" /> | ||
<div data-style="clean"> | ||
<ul class="formkit-alert formkit-alert-error" data-element="errors" data-group="alert"></ul> | ||
<div data-element="fields" data-stacked="false"> | ||
<label for="mailing-list-email">Get weekly posts in your mailbox</label> | ||
<input | ||
id="mailing-list-email" | ||
name="email_address" | ||
aria-label="Email address" | ||
placeholder="Email address" | ||
required="" | ||
type="email" | ||
> | ||
<button data-element="submit">Subscribe</button> | ||
</div> | ||
</div> | ||
<input type="submit" value="Subscribe" /> | ||
</form> | ||
|
||
<div class="footer"> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoying to load an external script. 😞
But good enough to get the initial integration going.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When testing on DuckDuckGo mobile, subscription still works even though the script is blocked. However, the user is redirected to a generic ConvertKit page, which isn't a great experience.
Should either: (1) self-host the script; (2) keep the script but have a better setup for redirection after posting; or (3) put together a minimal self-hosted version of the script.
In any case, it's good enough for now.