Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@sunsama/splash
Advanced tools
@sunsama/splash is a NPM Package that holds all the business logic necessary for our Webflow Splash pages. It makes it easy, as a developer, to build the logic for things like generating waitlist records, tracking facebook pixel values, generating amplitu
@sunsama/splash is a NPM Package that holds all the business logic necessary for our Webflow Splash pages. It makes it easy, as a developer, to build the logic for things like generating waitlist records, tracking facebook pixel values, generating amplitude device ids, tracking affiliate page views, and redirecting users to the right page.
The goal of this package is that you should only need to do three things in Webflow:
@sunsama/splash
in the <HEAD>
SunsamaSplash.default.initialize("production
)once the
DOMContentLoaded` event happens via the footer.If you do that, all the business logic should just work.
The project also contains webflow-simulator
which is a barebones Express app meant to simulate our Webflow pages. It allows you to test your changes to @sunsama/splash
against a real UI on localhost. It's a bit of extra work to maintain this and keep it "in sync" with our Webflow pages but it's helpful because it simplifies local development.
If you want to display an element that takes an email, creates a lead (waitlist record), and then forwards the user to the app page:
The email capture form should be a <form>
block and follow these rules:
id
of the email <input>
must be email
<form>
must be email-form
If you want a button that takes the user to app.sunsama.com/signup:
data-trigger-signupbutton
In some cases, we want to display a non-standard trial length.
If a CMS Collection page wants to offer a special trial length it needs this custom code in it's custom code "Before <body>
tag section":
<script> window.pageTrialLength = {{wf {"path":"trial-length","type":"Number"\} }}; // This weird stuff is the CMS Collection Item </script>
When a PartnerStack key is detected, we give a 30 day trial. In order for text like "14-day" to be replaced with "30-day" make sure to set the attribute data-trial-text = ""
The Blog Newsletter sign up button must have the class blog-post_subscribe-button
In Webflow, the set of pages under /conversion
are used to fire Google analytics events from "in-app" events. For example, when a user starts a trial inside of app.sunsama.com, we render a hidden <iframe>
that loads these conversion pages where the Google analytics code runs. See: https://github.com/sunsama/sunsama/pull/5154
name-2
in the id
, so be careful here.This library will automatically show different versions of a page and log the version to Amplitude for AB Testing. Here's how it works:
<div>
data-experiment=${experimentName}
data-variant=${A|B}
// Currently only support A or Bdata-bias
// Number between 0 - 1 that controls how often A is shown relative to B e.g. 0.9 would show A 9 times out of 10, this must be set on the A variant. Defaults to 0.5hidden="true"
// This is optional and for your sanity in Webflow, you might make your A variant not hidden and your B variant hidden so you don't see duplicated items in the Webflow editor.{ [
Experiment ${experiment} Variant Group]: desiredVariant }
that you can use to segment events/funnels on.Demo: https://www.loom.com/share/34a447768d6346c98bdbbe3451a32957
From the root of the repo bring up the basic web app service:
make install
make start-lite
Then bring up the "development" environment here
cd library/splash
npm install
npm start
This exposes an extremely basic HTML page at localhost:3010/
that has two text fields and a button that match the webflow pages. The page has the built script bundle imported in it's head and a single call to initialize it SunsamaSplash.default.initialize("development");
after the body. The goal is that we can do the same thing in Webflow and simply change code here.
Run npm test
for running Cypress tests in CLI, or npm run test/dev
for the UI.
npm publish
FAQs
@sunsama/splash is a NPM Package that holds all the business logic necessary for our Webflow Splash pages. It makes it easy, as a developer, to build the logic for things like generating waitlist records, tracking facebook pixel values, generating amplitu
The npm package @sunsama/splash receives a total of 4 weekly downloads. As such, @sunsama/splash popularity was classified as not popular.
We found that @sunsama/splash demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.