Articles on: Online Store

Adding Fleetwire to any website

Step 1: Add the JavaScript snippet





Copy & paste this code snippet on every page where you want to use FleetWire. This is typically pasted in a header template file, Google tag manager, or anywhere you can place javascript to be included. Paste your code as high in the <head> of the page as possible. You can find your code snippet here.





// NOTE: THIS IS JUST AN EXAMPLE; USE YOUR SNIPPET ON YOUR COMPANIES SETTINGS
<script>
    var fleetwireOptions = { company: "EXAMPLE" };
</script>
<script src="https://fleetwire.io/tenant/v2/fleetwire.js"></script>




Step 2: Add elements to your website





Paste the simple HTML snippets to embed date pickers, product cards, buttons, or lists anywhere on your website.

The data-id tag is where the listing id is placed. Each listing page will already have this filled in but you can change this to an existing listing ID in your fleet.

Button:


<!-- LISTING BUTTON -->
<div class="fleetwire-listing-button" data-id="EXAMPLE"></div>


Add a button block to your page. You can add any of your styling or classes to customize the look and feel of the buttons.

Result:




Fleet availability:



<div class="fleetwire-search"></div>


Result:






Single Card:



<div class="fleetwire-listing-card" data-id="EXAMPLE"></div>

Options:
data-showPrice="true"
data-currency="$"

Result:

Fleet List:



<div class="fleetwire-listing-list" data-showprice="true">


Result:




Misc:



Title
<span class="fleetwire-listing-title" data-id="EXAMPLE" />

Price
<span class="fleetwire-listing-price" data-id="EXAMPLE" />

Image
<div class="fleetwire-listing-image" data-id="EXAMPLE" />

Door count
<span class="fleetwire-listing-doors"/>

Seat count
<span class="fleetwire-listing-seats"/>


Add the listing title and price like in this example:

<p>Rent the new <span class="fleetwire-listing-title" data-id="EXAMPLE"></span>for ONLY $<span class="fleetwire-listing-price" data-id="EXAMPLE"></span> a day!</p>


Result: Rent the new Tesla Model X for ONLY $169 a day!



This is useful if you change the listing title or price often. Instead of needing to update your website code, you can update only the setting on FleetWire.io and it will be updated on all spots on your website automatically.



Note: You can find all the available snippets on your listing settings page on FleetWire.io. You can also request custom snippets if you find something you need and we're able to develop it.

Updated on: 07/07/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!