Marketing Elements
Marketing elements are an effective way of boosting awareness of Hokodo and giving information on how to pay with Hokodo at checkout. Making buyers aware that flexible payment options are available will also help to increase both the Conversion Rate and the Average Order Value.
Marketing elements should be visible at multiple stages of the buyerβs journey, including the homepage, trade/wholesale pages, and product pages. Displaying them as early as possible in the buyerβs journey will have the biggest impact on the take-up rate at checkout.
Setupβ
Follow these steps to get the Hokodo SDK as a JavaScript object on your page.
Download the Hokodo SDK on your pageβ
Include the Hokodo script on the pages where you wish to access the SDK. It should always be loaded directly from
https://js.hokodo.co
or js-sandbox.hokodo.co/hokodo-js/v1/
, rather than included in a bundle or hosted yourself.
<!--Sandbox URL for use while developing-->
<script src="https://js-sandbox.hokodo.co/hokodo-js/v1" />
<!--Production URL-->
<script src="https://js.hokodo.co/hokodo-js/v1" />
When using async or defer tags, executing any SDK methods must be made only after the script execution has finished. You will need to account for this in your code if you use these attributes.
You will now have an object named Hokodo
in the global scope:
window.Hokodo;
// or
Hokodo;
Instantiate the SDK object with your Public Keyβ
Pass your SDK Public Token into the Hokodo
object to instantiate it:
const hokodo = Hokodo("pk_test_xxxx", {
locale: "en-GB",
currency: "GBP",
});
If you have already identified the buyer with Hokodo platform, you can pass in userId
, organisationId
and companyId
to the Hokodo
object at the time of instantiation. This allows the credit limit banners to display the credit limit without going through the company selection flow.
const hokodo = Hokodo("pk_test_xxxx", {
locale: "en-GB",
currency: "GBP",
userId: "user-xxxx",
organisationId: "org-xxxx",
companyId: "co-xxxx",
});
Global optionsβ
The following global options are available on the Hokodo
object:
Parameter | Required | Default | Description |
---|---|---|---|
locale | false | en-GB | Language and region of the customer. Supported locales are en-GB , es , fr , de and nl . |
currency | false | GBP | Currency to be displayed in the marketing elements. Supported values are GBP and EUR . |
userId | false | Hokodo User object ID. | |
organisationId | false | Hokodo Organisation object ID. | |
companyId | false | Hokodo Company object ID. | |
bannerLink | false | https://www.hokodo.co/hokodo-for-buyers | This page opens when a buyer clicks on the banner.This option is not applicable for lightbox, FAQ, badge, product description page banner, and discount banners. |
faqLink | false | https://www.hokodo.co/hokodo-for-buyers | Use this option to provide a URL for the FAQ page. |
countryOptions | false | Use this option to provide the list of allowed countries in the company search for credit limit banners. e.g. ["GB", "ES", "FR", "DE", "NL", "BE"] | |
country | false | GB | Use this option to provide the preselected country in the company search for credit limit banners. |
Initialise marketing elementsβ
The marketing materials provided by the SDK can now be initialised using:
hokodo.marketing();
Content security policyβ
If you deploy a content security policy, you will need to add the following in order to fully support Hokodo's frontend SDK:
For Sandbox
connect-src
https://js-sandbox.hokodo.co, https://i-pay-sandbox.hokodo.coframe-src
https://js-sandbox.hokodo.co, https://i-pay-sandbox.hokodo.coscript-src
https://js-sandbox.hokodo.cofont-src
https://fonts.gstatic.comstyle-src
https://fonts.googleapis.com
For Production
connect-src
https://js.hokodo.co, https://i-pay.hokodo.coframe-src
https://js.hokodo.co, https://i-pay.hokodo.coscript-src
https://js.hokodo.cofont-src
https://fonts.gstatic.comstyle-src
https://fonts.googleapis.com
Updating global optionsβ
If you want to update the global options at any point after initialisation you can use the hokodo.update
method:
hokodo.update({
locale: "fr",
currency: "EUR",
});
Marketing Elementsβ
Here, we have put together a set of ready-made responsive marketing elements which you can add to your site when you launch Hokodo, as well as some guidance on when and where to use them.
Note
Payment plan details within marketing material are populated based on your contract e.g. Pay in 30 days
or Pay in 60 days
.
Available element typesβ
The element types provided by the SDK can be grouped into four different categories: the standard static banners, banners that allow buyers to check their credit limits, frequently asked questions element and multiple variations of banners to display promotional discount from Hokodo.
Standardβ
- Top Strip:
top-strip
,mobile-top-strip
- Leaderboard:
leaderboard-small
,leaderboard-medium
,leaderboard-large
,leaderboard-xlarge
,mobile-leaderboard-small
,mobile-leaderboard-medium
- Rectangle:
rectangle-small
,rectangle-medium
,rectangle-large
,rectangle-xlarge
- Square:
square-small
,square-medium
- Portrait:
portrait
- Vertical Banner:
vertical-banner
- Hero:
hero
- Cover:
cover
- Mobile Banner:
mobile-banner
- Lightbox:
lightbox
- Badge:
badge-small
,badge-large
Frequently Asked Questionsβ
Credit Limitβ
- Product Description Page Banner:
credit-limit-banner
- Top Strip:
credit-limit-top-strip
- Modal:
credit-limit-modal
Discountβ
- Leaderboard:
discount-leaderboard-small
- Rectangle:
discount-rectangle-small
- Square:
discount-square-medium
- Mobile Banner:
discount-mobile-banner
- Product Description Page Banner:
discount-product-banner
- Top Strip:
discount-top-strip