1. Help Center
  2. Setup & User manual | Collect

Guide Newsletter plugin

This guide contains instructions on how to add the Loyall Collect Newsletter plugin to your website.

Each location has a unique ID. Request your unique token by sending an email to support@loyall.no. Remember to add the URL to the website you are going to add the plugin to, so that we can add it to captcha approval.

The widget is first added to the <head> and <body> element, so that you can easily add one or more scripts wherever you want on the website.

Step by step:

  • Go to your website.
  • Add this script to the <head> element:


head

  • Then place this script at the bottom of your <body> element. Remember to replace "YOUR ID HERE" with your actual ID. 

<script type="text/javascript">

    window.addEventListener('DOMContentLoaded', function() {

    window.CreateNewsletterWidget({newsletterID:"YOUR_ID_HERE"})

    })

</script>


body

  • Finally you can place the <div> which contains the widget itself, wherever you need it to be on the website. 
  • Add "container" where you want to have the widget on the website.
  • Add <html> block inside the container.
  • Add <div> script inside the <html> container.  

<div class="newsletterWidget"></div>


html

  • Remember that you can change between page or center position by editing the html element or container.

The widget will appear on your home page like this:

exampleNewsletter subscriptions will receive a confirmation email and automatically be sent to your Collect dashboard.

You can see the number of registrations under "contacts from website", and use these in e-mails together with the rest of the database.