Setting up Clicklease buttons
Requirements
- To begin using Clicklease buttons you will need to have your Clicklease token.
- You will need to reference our Javascript Library.
- You will need to choose a button style.
Reference the Javascript library
The first step for setting up the Clicklease buttons is to reference our Javascript library. This can be done by adding the following code to your website. This script needs to be called prior to the button tag, so generally, this is added to the head of the webpage.
<script>
async function getScript() {
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "https://app.clicklease.com/jsdk/getScript";
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer");
}
getScript();
</script>
Add a Clicklease button tag
After adding the Javascript library, you can now add the Clicklease button tags to your page.
<clk-button price="20000" desc="apple" button="white-dark-1" token="55dd82b3-a9ae-431c-a58d-6fc67dd4a33d"></clk-button>
<clk-button price="20000" desc="apple" button="white-dark-1" token="55dd82b3-a9ae-431c-a58d-6fc67dd4a33d" withInfoPage=""></clk-button>
<clk-button price="20000" desc="apple" button="white-dark-1" token="55dd82b3-a9ae-431c-a58d-6fc67dd4a33d" withInfoPage></clk-button>
<clk-button price="20000" desc="apple" button="white-dark-1" token="55dd82b3-a9ae-431c-a58d-6fc67dd4a33d" withInfoPage="true"></clk-button>
Attributes
-
Price: A dollar amount that is used to calculate a monthly payment, only needed on "pricing button" types.
-
desc: The name or description of the item for which the amount is listed.
-
button: The name of the style of the button you want to use.
-
token: A serial token that links to your business lease application and associates the applications with your store.
-
withInfoPage: This attribute allows the iframe to open with the URL for the benefits page. This attribute has three different ways to be included to allow the benefits page to be included in the iframe:
withInfoPage=""
withInfoPage
withInfoPage="true"
This will send a
true
value that will allow the benefits page to be shown in the iframe flow.
If the attribute contains other information, it will send afalse
value, and it won't show the benefits page information in the iframe.
If thewithInfoPage
attribute is not included in the tag, or if the attribute is included with the value of"false"
, the benefits page won't be included in the iframe's flow.
Example:withInfoPage="false"
.
All buttons link to a lease application.
Clicklease offers two types of buttons
-
Pricing Buttons: These buttons calculate and display an affordable monthly payment based on an item cost or total cost. Pricing buttons require a "price" attribute in the tag that is passed to our Javascript SDK to determine a monthly payment.
-
No pricing buttons: Buttons that simply promote financing with Clicklease that do not calculate a monthly payment. Useful for displaying on pages without an item amount or total cost.
For different script integrations:
CMS | Example |
---|---|
Joomla | 1. Log in with your credentials. 2. On the left sidebar, click "Templates". 3. Look for your domain or the default option and click it. 4. In the Navigation tab, click "Custom code". 5. Look for the "Before </body>" text area. 6. Paste the script between <script> tags and save. |
Shopify | 1. Access your Shopify account and click "Online store" > "Themes". 2. Click "Customize" on the right side. 3. In the lower-left corner, click "Theme actions" > "Edit code". 4. In the "Layout" folder, click "theme.liquid". 5. Add the script after the </body> section and save. |
Xcart | 1. Access your account and go to "Content" > "Edit Templates". 2. Look for the "common.js" file in the "common files" > "js" folder. 3. Add the script to a clean space in the file and save. |
BigCommerce | 1. Access your account and click "Storefront" > "Script Manager". 2. Click "Create script". 3. Fill in the details: - Name: "clicklease" - Location: "Footer" - Pages: "All Pages" - Category: "Essential" - Type: "Script" 4. Paste the script between <script> tags and save. |
OpenCart | 1. Go to admin > "Design" > "Theme Editor". 2. Choose your store (e.g., "Default"). 3. Click "success.twig" in the "Common" template. 4. Add the script above {{footer}} and save. |
CS cart | 1. Go to "Design" > "Layouts". 2. Add the script in the custom HTML code section above {{footer}} and save. |
WIX | 1. Open the dashboard and click "Settings" at the bottom left. 2. Click "Custom code". 3. Add the script to the header, footer, or body (recommended: footer). |
Updated 4 days ago