HTML Snippet

How to Add Announce to Your Website

Prerequisites

  • A website with access to edit the HTML files
  • An Announce account

Step-by-Step Integration

1. Create/Login to Your Announce Account

  1. Navigate to announce.layeredy.com
  2. If you're a new user, click on the "Sign Up" button and complete the registration process
  3. If you're an existing user, log in with your credentials

2. Get Your Unique Announce Snippet

Once logged in to your Announce dashboard:

  1. Navigate to the "Integration" or "Settings" section
  2. Look for the "Website Integration" or similar option
  3. You'll find your unique script tag that looks something like:
<script src="https://announce.layeredy.com/js/embed.js" data-user-id="abc_1234567890"></script>    
  1. Copy this snippet to your clipboard

3. Add the Snippet to Your Website

To properly integrate Announce:

  1. Access your website's source code through your file manager, CMS, or code editor

  2. Locate your website's main HTML file(s) (often index.html or a template file)

  3. Find the <head> section of your HTML document

  4. Paste the Announce script snippet inside the <head> tags, like this:

  5. Save the file and upload it back to your server if necessary

4. Clear Cloudflare Cache (Optional)

If your website uses Cloudflare, you may need to clear the cache to see the changes immediately:

  1. Log in to your Cloudflare account
  2. Select your website domain
  3. Navigate to the "Caching" section
  4. Find the "Purge Cache" option
  5. Select "Purge Everything" or purge specific files as needed
  6. For more detailed instructions, visit the Cloudflare documentation

Verification

To verify that Announce is properly integrated with your website:

  1. Visit your website in a browser (use incognito/private mode to avoid local caching)
  2. Open your browser's developer tools (right-click > Inspect or press F12)
  3. Go to the Network tab and reload the page
  4. Look for a request to announce.layeredy.com to confirm the script is loading

Troubleshooting

If you're experiencing issues with your Announce integration:

  • Ensure the script tag is properly placed within the <head> section
  • Check if there are any JavaScript errors in your browser's console
  • Verify that your website's Content Security Policy (if any) allows scripts from announce.layeredy.com
  • Try clearing your browser cache and Cloudflare cache (if applicable)

Next Steps

Now that Announce is integrated with your website, you can:

  • Configure announcements through your Announce dashboard
  • Track engagement metrics

Self-hosting the script

If your organization requires you to not use any external Javascript code, you can self-host the embed.js code by following this guide