WAIT… Make sure that you have added the Surface Tag to your site before proceeding.
Edit Head Tag
Add the following code snippet to your site’shead
tag to enable the slideover form.
REPLACE ME WITH FORM URL
with the url to your surface form found by clicking the share button on the surface platform.
Choose trigger buttons
The next step is to choose which buttons you’d like to trigger the form. This is done by simply adding the class namesurface-form-button
to the elements which should be able to make the form appear.
Optimize Speed
Add the following<link>
tags inside the <head>
of your site:
Replace
REPLACE ME WITH FORM URL
with a Surface Form URL.Explanation
- dns-prefetch → Resolves the domain early to skip DNS lookup delays.
- preconnect → Prepares the TCP + TLS handshake so the browser is ready to request assets immediately.
- prefetch → Fetches the form in advance, so it’s ready when a user opens it.