1
Open your HTML file
Start by opening the HTML file for your website. You should have a basic site structure already in place, including
<html>, <head>, and <body> sections, along with any existing content elements.2
Add a container for the widget
Create an HTML element where your Claimr widget will be embedded. This element will serve as the widget’s container.
- You can use any suitable HTML element, typically a
<div>. - Assign a unique
idto this container.
3
Insert the Claimr script
Next, you will add the Claimr embed script into your HTML file.
- Go to your Claimr account to copy the embed script for your campaign.
- Paste this
<script>tag into your HTML file.
- In the
<head>section. - At the end of the
<body>section, before the closing</body>tag. This is a common practice for library scripts as it allows the page content to load before the script executes.
data- attributes:src: The URL of the Claimr widget script,https://widgets.claimr.io/claimr.min.js.id: Must be exactlyclaimr-script. The script reads its settings from the element with this ID.data-organization: Your organization ID.data-campaign: Your campaign ID.data-autoresize:trueto resize the container to fit the widget. To turn resizing off, remove the attribute: any value, includingfalse, turns it on.data-container: This ID should match the ID you gave to your container element in the previous step.
Finalize integration
After making these changes:- Save your HTML file.
- Refresh your web page.