Add your agreement to a hand-coded website
Paste the HTML code of your agreement from TermsFeed Agreements & Policies into a page of your website, or link its Live Link from every footer. The code puts the text on your own domain, in your own layout and styles, as a copy you replace after each change. The Live Link always shows the text you saved last, on a page of the TermsFeed app. Compare the code and the Live Link in Live Link, HTML Code, or Download File.
Follow these steps on any platform without a guide of its own, such as Ghost or Drupal. Paste the code where the platform takes raw HTML in a page, and add the link where it edits the footer. Deploy a site on Cloudflare Pages with Add a Legal Agreement to Cloudflare Pages.
Setup takes 3 steps and about 15 minutes. Before you start, activate your agreement in the TermsFeed app and get write access to the HTML files or templates of your website and a way to upload them.
Step 1: Copy the HTML code of your agreement
Copy the code in the language the page shows.
- Open your agreement in the TermsFeed app and select Copy HTML in the sidebar.
- Select the tab of the language you publish, where the screen shows tabs.
- Click Copy under the code.
The code is a fragment for the content area of a page, with no <html>, <head>, or <body> element and no styles. It opens with the agreement name in an <h1> and a "Last updated" line, then headings, paragraphs, lists, and links. Read what else the code holds, such as the "Contents" list, in Copy Your Agreement as HTML Code.
Step 2: Paste the code into a page of your website
Paste the code into the main content area of a page that uses your site layout, so the policy keeps your header, footer, and styles. Save the file as UTF-8 and keep the charset meta tag, so accented letters and typographic quotes show as written.
Use this template for privacy-policy.html. Replace the comment with the code, and keep your own header and footer markup.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Privacy Policy - Example Store</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<main class="policy">
<!-- Paste the HTML code from the Copy HTML screen here -->
</main>
</body>
</html>
Style the pasted text inside the policy wrapper, so your rules do not reach the rest of your pages. Target the Contents list with the class toc-list, and each "#" link that "Show heading anchors" adds with the class heading-anchor.
.policy {
max-width: 960px;
margin: 0 auto;
line-height: 1.75;
}
.policy h2 {
margin-top: 2em;
}
.policy a {
text-decoration: underline;
}
.policy .toc-list {
list-style: none;
padding-left: 0;
}
Upload the page to your server.
Step 3: Link the agreement from the footer of every page
Add the link to the footer template, or to the footer of each page. Point it at your new page, or at the Live Link, which you copy with Copy beside the address under "Your Live Link" on the Install screen of the agreement.
Add one of these links to the <footer> of your pages, with your Live Link in place of YOUR_LIVE_LINK.
<footer>
<a href="/privacy-policy.html">Privacy Policy</a>
<a href="YOUR_LIVE_LINK">Terms and Conditions</a>
</footer>
A link to the Live Link takes visitors off your domain. Find what they see there in Share a Hosted Agreement Link.
How to check the policy on your live website
Upload every changed file and clear the cache of your content delivery network (CDN), where you use one.
- Open a private window and load a page of your site.
- Click the agreement link in the footer. Your policy page opens on your domain in your site styles, or the Live Link opens on the TermsFeed app.
- Click a heading in the "Contents" list, where the code has one. The page scrolls to that heading, and its
idshows after#in the address bar.
Common mistakes with a hand-coded policy page
- The page has 2
<h1>headings. Your layout prints a page heading, and the code opens with its own<h1>. Delete the<h1>line from the code, or leave the page heading out of the layout of the policy page. - The page shows old text. Copy the code again after every change in the TermsFeed app, and replace the old code in the file.
- The text looks unstyled. The stylesheet of your site does not load on the new page. Link the stylesheet in the
<head>, as the example page does. - The Contents links go to the wrong place. Another element on the page has the same
idas a heading of the code, such asid="contents". Rename theidin your layout and keep the ids of the code. - The footer link misses some pages. The link went into one page, not into the shared footer template. Add it to the template, or to every page that has a footer.
- The footer link opens the termsfeed.com website. The agreement is switched off or not yet activated. Get it back with Policy Link Opens the TermsFeed Website Instead.
- The text looks different from the Live Link. The Appearance settings in the TermsFeed app style the Live Link only. Track down the other causes in Pasted Agreement Looks Wrong on Your Website.