# Plan inclusions and pricing

Please see [here](https://calcumate.co/pricing) the inclusions and pricing for Calcumate's plans. \
\
Importantly, you are able to start for free and then choose the plan that suits your company's needs.


# Step 1 - Initial set-up

* Start by naming your new calculator.&#x20;
* Add your website domain. Note, you can add 2 domains i.e. one for testing and one for your primary domain.&#x20;
* Select your chosen language. If we don't have your chosen language please contact us [here](https://calcumate.co/contact-us).
* Select the storage type that best suits your business. If you offer multiple services you can make a new calculator later.&#x20;
* Choose the measurement system and turn on/off the 'measurements and dials' based on your preferences.
* Add your '[call to action URL](https://help.calcumate.co/calculator-customization/call-to-action-url)' (CTA). This is the URL link on the button displayed on the calculation result. This will take your customer directly to your chosen landing page (i.e. contact form or booking page).


# Call to action URL

The call to action URL can be set:

* As a default for all URLs on the calculator
* Per storage unit type

To change the default call to action URL for the calculator, [login](https://help.calcumate.co/calculator-setup-and-customization/step-1-initial-set-up/www.calcumate.co/login), select the calculator you would like to edit, and update the "Call to action URL field":

<figure><img src="/files/gMfnvVCuxO1pTqJEaDtf" alt=""><figcaption></figcaption></figure>

To change the call to action URL for individual storage unit types, [login](https://help.calcumate.co/calculator-setup-and-customization/step-1-initial-set-up/www.calcumate.co/login), click into the individual storage unit, and edit the "URL to reserve" field:

<figure><img src="/files/QQlHZi7UWeEsRNTWrgA2" alt=""><figcaption></figcaption></figure>


# Call to action (advanced settings)

To change the default call to action URL for the calculator, [login](https://help.calcumate.co/calculator-setup-and-customization/step-1-initial-set-up/www.calcumate.co/login), select the calculator you would like to edit, and update the "Call to action URL field".\
\
After you have set the Call to action URL, you can click "SHOW ADVANCED SETTINGS" to edit/enable the following:

* **Allow the user to bookmark their result.**
  * This will ask for the user’s name, email and phone number, before providing them with a link to the calculator that has the items they added saved. Note: So we don’t ask for their lead details twice, turning on this option will disable ‘Request lead details’.<br>
* **Request lead details from the user.**
  * Before sending them to your chosen call to action URL, we’ll ask for their name, email and phone number. This will be automatically emailed to you as they proceed to the next page. Note: This option is disabled if you switch on the ‘bookmark results’ feature.<br>
* **Turn on CTA URL Params to append unit information to the CTA URL.** \
  \
  The following information can be appended:
  * Unit quantity
    * This is for when you have one size of unit and the calculator recommends how many the user needs.
  * Unit ID
    * This is when you have multiple unit sizes and the calculator recommends one set of dimensions.
  * Unit Volume
  * Unit Used Space
  * Unit Quantity (Multiple)
    * Allow to include unit ID and quantity into Booking URL. Pattern: {Unit ID}={Unit Quantity}<br>
* **The CTA Link**
  * The URL where the customer will be taken after they finish using the calculator. (eg. your quote or booking page)<br>
* **The CTA Label**
  * The words on the button which the user presses when they have finished using the calculator (eg. GET QUOTE)<br>
* **Whether the CTA opens in the same tab or a new tab**

The screen that allows the above to be selected looks like this:

<figure><img src="/files/A9ihqbHzY2toNdR7UsNY" alt=""><figcaption></figcaption></figure>


# Step 2 - Adding unit sizes

* You can toggle the ability for your calculator to provide 1, 2 or 3 unit sizes. Enabling multiple results will provide your client with more visual understanding on what each unit size can offer. <br>

  <figure><img src="/files/RnLAelikaasSy38437DS" alt=""><figcaption></figcaption></figure>
* To modify the unit size/name/description or direct call to action URL click the pencil icon and change as required. If you no longer want this size to be offered simply delete by using the bin icon. <br>

  <figure><img src="/files/AHtHz6JBS27zir2OuYUF" alt=""><figcaption></figcaption></figure>
* You can manually add each of your storage unit sizes by using the 'add unit' button or you can mass upload by following the 'import unit sizes' button.<br>

  <figure><img src="/files/hvO66ugVx5yFaBVM6M38" alt=""><figcaption></figcaption></figure>


# Step 3 - Categories

Categories is where you can create go to tabs for your clients to use when selecting their items. You can add/remove items from each category as well as rename them based on your preferences.

* Display search function will enable a free text search where the client can search a key word to find the relevant item.
* Add/delete categories, you can have up to 6 categories.
* Edit your chosen category by clicking the 'edit' (pencil) icon.

  <figure><img src="/files/RrT2PUhWZ84BJVMultZE" alt=""><figcaption></figcaption></figure>

  * To add items to your category, tick the circle and the item will be moved to your active item list (blue shaded background). To remove the item from the category untick the circle.<br>

    <figure><img src="/files/uIFIfgYppUtkrOArc3N1" alt=""><figcaption></figcaption></figure>

  * Re-arrange the items as you feel best. Don't forget to press save when done (top right of the screen).\
    &#x20;

    <figure><img src="/files/VZI0j7GxqEHIljVYOnhu" alt=""><figcaption></figcaption></figure>

  * Customise your item name/size/weight. Click the customise icon and you can then modify the size/weight of the item by +/- 30%, and change the name of the item. <br>

    <figure><img src="/files/afZ3M3GK4MZRVwQr86cH" alt=""><figcaption></figcaption></figure>


# Step 4 - Presets

Create presets so your client can get an estimate quickly. You can create 5 presets, we have already designed 5 for you, but you can modify/delete as required.

* Toggle on/off the preset (on = blue / off = grey)<br>

  <figure><img src="/files/bRUT9T3yE0hOZxBKx3Yg" alt=""><figcaption></figcaption></figure>
* The preset tab will become available inline with your categories.&#x20;

  <figure><img src="/files/yYYpICeUESf8NWdTJzGp" alt=""><figcaption></figcaption></figure>
* You can put the 'preset' tab on the left or right side, by editing the preset settings.<br>

  <figure><img src="/files/WV9HH8JiclUEKedVIGC9" alt=""><figcaption></figcaption></figure>
* Use the pencil icon to customise/edit your preset. \
  Change the preset name and use the + and - symbols to add/remove items from your preset. Scroll down to account for all relevant items. <br>

  <figure><img src="/files/836PUGywaoapRzYN0Viq" alt=""><figcaption></figcaption></figure>


# Step 5 - Design

The design of a calculator can be amended by creating a new calculator or logging into My Calcumate at [calcumate.co/login](https://app.calcumate.co/login) and navigating to your Calculator Builder -> Select the appropriate integration -> Design Tab.

You are able to amend the following calculator design elements:

**Branding**

* Font

**Intro**

* Primary text
  * "GET STORING" as default
* Secondary text
  * "Start by adding items to your storage unit" as default

**Logo**

* Add your company logo to your storage unit&#x20;

**Unit Image**

* If you would like to show a different unit type from our standard unit types. You can upload your image file.

**Colour scheme**

* Primary colour
* Secondary colour
* Unit colour

**Background colour**

* Gradient (two toned)
* Solid
* Transparent&#x20;

**Show Ismoetric Grid**&#x20;

* toggles on/off the grid background&#x20;

Buttons

* Button colour on the 'items added' list&#x20;
* Button text colour is the text colour on the 'items added' list
* Category button border colour&#x20;

<figure><img src="/files/KCcMAhV9YRXcbxQIFlJo" alt=""><figcaption></figcaption></figure>


# Step 6 - Details

In this step you can enter your billing details


# Step 7 - Publish to your website

##

You have now created your calculator and ready to implement your code onto your web page.&#x20;

1. Go to the 'confirm' step on your calculator and press 'Yes, publish now'.<br>

   <figure><img src="/files/i3dsyAjR4gDPb89Mo3Hm" alt=""><figcaption></figcaption></figure>
2. Press 'copy to clipboard' and paste the code onto any page of your websites domain (it can be added to multiple pages within the sames domain). \
   \
   If you're using a website editor, you will want the 'custom html' or 'embed code' option. \
   Alternatively, if you're not using a website editor, a developer should be able to simply paste this code to the designated page. \
   \
   **Note**: we recommend pasting this code directly from the 'copy to clipboard' to prevent the code reformatting. <br>

   <figure><img src="/files/Ck6oSrgxaj3l116ZTSTa" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/ofYwDvV6RQprAV9xtPLa" alt=""><figcaption></figcaption></figure>
3. Need to make changes to your integration? No problem, simply [login](https://calcumate.co/login) to your account and make any changes that you need. Your website will automatically saves and updates as you make the changes in your dashboard.&#x20;

## Embedding with iframes

If you’re adding your integration through web editors like Wix or GoDaddy, then your Calcumate integration will likely be added inside an iframe. \
\
This shouldn’t impact the performance of either your website or your Calcumate integration, but you may need to manually set the height and width of the iframe in order for it to appear correctly on your website. \
\
Importantly, you’ll need to set the dimensions for both desktop and mobile devices.\
\
We recommend: \
Desktop: 980px x 800px\
Mobile: 350px x 850px

<figure><img src="/files/d8jNhAaAvvNDSHvnGda4" alt=""><figcaption></figcaption></figure>

## Domain Mismatch Error

This error message appears when the domain set for your Calcumate integration doesn’t match the one your integration has been embedded onto. Commonly this is because of either a spelling mistake or because of the way our database reads your domain.&#x20;

Either way, the good news is there’s a simple solution.

1. Copy the URL that our error message has recommended.
2. [Login](https://calcumate.co/login) to your Calcumate account and paste the URL in step 1 of the integration builder. The website URL in options 1 should match the domain you're pasting your code. \
   ![](/files/nYlpAAyg2XSTLIwADxEl)
3. Continue through the steps and re-publish your new integration code snippet.
4. Copy this new integration and use it to replace the existing code on your website.
5. Go to the right page and clear your cache, before completing a hard refresh of your browser


# How to integrate Calcumate to Framer

**Step 1: Create a Calculator**

* Start by creating a new calculator from your Calcumate dashboard (login [here](https://calcumate.co/login) if you haven't already).
* You can also copy an existing calculator if you've already set one up before.

<figure><img src="/files/2L9FuG13h5VFvKopAjPL" alt=""><figcaption></figcaption></figure>

**Step 2: Publish the Calculator**

* Go to the Confirm step.
* Click Publish to generate the code snippet.

<figure><img src="/files/kqwud84f7M3PMShz5ynt" alt=""><figcaption></figcaption></figure>

**Step 3: Copy the generated code snippet**

<figure><img src="/files/HDqn5mrQV4jqwrG4aDRO" alt=""><figcaption></figcaption></figure>

## Approach 1

**Step 4: Add the embed**

* Go the insert menu, in the "Utility" category find the "Embed" item and drag it to the website.

<figure><img src="/files/iFdNIXvDu3XSo5Cabzlm" alt=""><figcaption></figcaption></figure>

**Step 5: Add the generated snippet to the embed**

* Select the embed item
* Scroll down on the properties and find the "embed" section
* Click on the HTML button
* Paste the code snippet

<figure><img src="/files/PSehZYQBPYC1poZZgac0" alt=""><figcaption></figcaption></figure>

**Step 6: Add a style to the code snippet**

* In the \<div> tag, insert the property style with this value

`style="width: calc(100vw - 40px);max-width: calc(100vw - 40px);"`

The code snippet should look like this now:

<pre class="language-html"><code class="lang-html"><strong>&#x3C;div
</strong>  id="calcumate-root"
  data-integration="ready-layout-272806.framer.app"
  data-integration-2=""
  data-ref="AQICAHhReAOexSsfBeJ/FMNVdjLFzyMEhuepXqwRfRaqckbrnAHuaOBBjQ0oYfYSZfPPpQhwAAAAgzCBgAYJKoZIhvcNAQcGoHMwcQIBADBsBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDJFfnjyHj8ipzqKqhAIBEIA/fZFsqE7ThBq1XcFkpUmHAa4sm07+g98Vlyv0XHqZdaAvxWx+GDSwGfVXySu6deP1uBaczPeFHD6ayG6d4N3P"
  data-int="112a234c-0ca3-4f07-981c-a1845d0bfa7c"
  style="width: calc(100vw - 40px);max-width: calc(100vw - 40px);"
>&#x3C;/div>
&#x3C;script defer src="https://production.calcumate.co/static/js/main.js">&#x3C;/script>
</code></pre>

**Step 7: Publish/Update your website**

<figure><img src="/files/hBnM19k0veqar3w1SH5g" alt=""><figcaption></figcaption></figure>

## Approach 2

**Step 4: Add the code to framer**

* On the edit view, click on the settings button

<figure><img src="/files/E6LxavPro9foPAAYS7os" alt=""><figcaption></figcaption></figure>

* Select the page in which you want to embed the calculator and scroll down to the "custom code" section and paste in "End of \<body> tag" or click in the "show advanced option" and paste it in "Start of \<body> tag".

<figure><img src="/files/mSDbJSQt4u7uOuE5XXZs" alt=""><figcaption></figcaption></figure>

**Step 4: Publish/Update your website**

<figure><img src="/files/0Z7efuO1XUypc1lJmcKK" alt=""><figcaption></figcaption></figure>


# How to integrate Calcumate to Wix

**Step 1: Create a Calculator**

* Start by creating a new calculator from your Calcumate dashboard (login [here](https://calcumate.co/login) if you haven't already).
* You can also copy an existing calculator if you've already set one up before.

<figure><img src="/files/LxTjlrwUZYikMLtPfdte" alt=""><figcaption></figcaption></figure>

**Step 2: Publish the Calculator**

* Go to the Confirm step.
* Click Publish to generate the code snippet.

<figure><img src="/files/WlytrluIkzTMWJmUqqQV" alt=""><figcaption></figcaption></figure>

**Step 3: Copy the generated code snippet**

<figure><img src="/files/7aFIbW1idryStEghPNiM" alt=""><figcaption></figcaption></figure>

**Step 4: Add the embed element**

* On the edit view, click on the "add elements" button, find the "Embed Code" category and select "Embed HTML"

<figure><img src="/files/lCzwQJ6tR7tusbhxz5Pd" alt=""><figcaption></figcaption></figure>

**Step 5: Configure the embed**

* Select the embed
* Select the "code" option (if not selected)
* Paste the code snippet generated on *step 3*
* Click on "apply"

<figure><img src="/files/7WIj6goip58m61B4NUdi" alt=""><figcaption></figcaption></figure>

**Step 6: Adjust the embed dimensions**

* At the top of the last-step code we need to paste this style tag

```html
<style>
	#calcumate-root {
		width: 100% !important;
		height: 1500px;
		overflow: none;
	}
	@media (min-width: 1024px) {
		#calcumate-root {
			height: auto !important;
			min-height: 700px;
		}
	}
</style>
```

This will help to set the dimensions of the calculator on desktop and mobile view. The code should now look as this:

```
<style>
  #calcumate-root {
    width: 100% !important;
    height: 1250px;
    overflow: none;
  }
  @media (min-width: 1024px) {
    #calcumate-root {
      height: auto !important;
      min-height: 700px;
    }
  }
</style> 
<div
  id="calcumate-root"
  data-integration="www.wixtest.com"
  data-integration-2=""
  data-ref="<your-data-ref>"
  data-int="<your-data-int>"
></div>
<script defer src="https://production.calcumate.co/static/js/main.js"></script>
```

**Step 7: Publish/Update your website**

* On the top-right corner click on the publish button and select your configuration

<figure><img src="/files/o9rYkCDpoKGVkubEp4h3" alt=""><figcaption></figcaption></figure>


# Save Loading Plans

The **Save Loading Plans** feature allows your customers to **save, revisit, and share** the optimization results generated by Calcumate. When enabled, users can submit a small form after completing a calculation and receive a **shareable link** that preserves their selected unit, items, configuration, and visual loading plan.

This makes it easy for customers to continue a conversation with your team, request quotes, or collaborate internally without repeating the entire calculation.

***

### **What Is the Save Loading Plans Feature?**

Save Loading Plans allows an end user to:

* Generate a **shareable URL** of their calculation results
* Save the selected items and unit configuration
* Return to the same loading plan later
* Provide key contact details to your business

The shared link opens the calculator **pre-loaded with the exact configuration** the user originally created.

This provides continuity between the user's initial exploration and your sales or operations workflow.

***

### **Why This Feature Is Valuable**

#### **For your business**

* Great for internal quoting, validation, or operational planning
* Improves conversion by letting users “save progress” and return later
* Works well in multistep funnels, internal apps, and email-based workflows

#### **For your customers**

* They don't need to repeat the calculation
* They can send their loading plan to partners or family members
* They can revisit the exact configuration later
* It becomes easier to compare units and configurations

***

### **How to Enable Save Loading Plans**

You can activate this feature directly in the **Calcumate Dashboard**.

1. [Log](https://calcumate.co/login) into your Calcumate Dashboard
2. Navigate to your calculator configuration

Step 1: Go to the calculator configuration

<figure><img src="/files/XM7heHc9HhKy0f5LKFuW" alt=""><figcaption></figcaption></figure>

Step 2: Go to the Advanced Settings

<figure><img src="/files/UNUaKzorYxu0KvWBuxi6" alt=""><figcaption></figcaption></figure>

3. Look for **Allow the user to bookmark their result** in the features list

<figure><img src="/files/typQWsCYfSYedhJhA4P9" alt=""><figcaption></figcaption></figure>

4. Toggle **Allow the user to bookmark their result**
5. Configure the notification email(s) you want to receive saved plans

   * These emails must be added in the *Where would you like their details emailed to* section

   <figure><img src="/files/WrsfouPnt8V49xmH6jYV" alt=""><figcaption></figcaption></figure>

Once enabled, the “Save Loading Plan” action automatically appears in your calculator after a calculation is completed.

<figure><img src="/files/imHDcGg3nRHnCDSTlkGu" alt=""><figcaption></figcaption></figure>

***

### **How the Save & Share Flow Works (End User Experience)**

After completing an optimization, your customer sees a **Save Loading Plan** button.

#### **Step-by-step flow**

1. **User completes a calculation**\
   The calculator produces the loading plan visualization and selected product list.
2. **User clicks “Save Loading Plan”**\
   A small form opens requesting basic contact details (name, email, phone—depending on your configuration).
3. **User submits the form**\
   Calcumate:
   * Generates a unique, shareable URL
   * Sends this URL to the user’s clipboard (copy prompt)
   * Sends the same URL to the email(s) you configured in your Dashboard
4. **User shares the link**\
   Anyone with the URL can open the loading plan on the same calculator page.
5. **Your team receives the saved plan**\
   The email includes:
   * Customer details
   * Shared link
   * Context of the calculation (unit, items, etc.)

> **Note:** The link works on any calculator because it stores all relevant data, but it is **intended** to be used on the calculator where the optimization originally happened.

***

### **Example of a Shared Link**

A typical shared URL looks like:

```
https://yourcalculator.com/?planId=abc123xyz
```

Opening the link loads the calculator **pre-filled** with the exact items and unit used by the user.

***

### **Frequently Asked Questions (FAQ)**

#### **Can users edit their loading plan after opening the shared link?**

No. They can modify items or units, and run a new optimization. But that will not be updated on the plan.

#### **Does the link expire?**

Currently, save links do **not expire**.

#### **Is personal information included in the shared URL?**

No. Personal details are only sent to your configured email(s) and are never stored in the URL.

#### **Can we customize the form fields?**

Field customization is currently not supported for loading plans.

#### **Can we use the shared link in internal tools?**

Yes. Many clients embed these URLs in CRM notes, email threads, or quoting systems.

***

### **Troubleshooting**

#### **The Save Loading Plan button does not appear**

Check:

* Feature is enabled in the Dashboard

#### **We are not receiving emails**

Verify:

* Your notification emails are correctly added in Dashboard settings
* Emails are not being filtered by your mail provider

***

### **Best Practices**

* Add your team’s shared inbox to the notification list (e.g., sales@, operations@)
* Use shared URLs internally for quotes, cross-team reviews, or validation

***

If you need help enabling the feature or customizing the workflow, contact our Support team.


# How to Set Up CalcumateGEO

**Step 1: Create a Calculator**

* Start by creating a new calculator from your Calcumate dashboard (login [here](https://calcumate.co/login) if you haven't already).
* You can also copy an existing calculator if you've already set one up before.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd2nzI3zm5NKSzEa72Ua48TaycIDkyYRnuFIl7jXLLjy8NrXXz-uL6o8sAh_AN373CBHz0ARbmuGGSvXa9WnkgtA319A3OYFVtMOqAQCjIH5DoXTVUH6QEj27vqpbmrtjtuvzPJ?key=dn3f7P5ipNHDHqVjWKjxBQ" alt=""><figcaption></figcaption></figure>

<br>

**Step 2: Enable Geolocation Widget**

* Go to Advanced Settings of the calculator and enable the feature: *"ADVANCED – This is a store-finder calculator, display the geolocation widget"*
* Save your changes.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZlpNTvR5KkW9STezsIdGwGr49K06rung2Zj0h9ONeDzbO6B_66LNn3XCuz5hW69-XIN2Ww1etm04wXcASYcua0rVk9Ynkug0YYfHyzKFcYbbhwhHj7M00fqQQfULIM3V-vP3izw?key=dn3f7P5ipNHDHqVjWKjxBQ" alt=""><figcaption></figcaption></figure>

**Step 3: Publish the Calculator**

* Go to the Confirm step.
* Click Publish to generate the code snippet.
* Copy and paste the snippet onto your website, just like a regular Calcumate calculator.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc4j2vh1kPMOaH0HtX8Z7QPL5MPCfbULYxY_qlyDLxLK0g1UQOWL9Cxv9zR05OGfozI0KDzNMA5oW1zHOzC0i_Q-QE1U2PWPntMCVW8PT0OhKS9Vbo_VZJTc82SizjOpA_1uQEy0g?key=dn3f7P5ipNHDHqVjWKjxBQ" alt=""><figcaption></figcaption></figure>

**Step 4: Configure Your Geo Locations**

* In your dashboard, go to My Account.
* Head to the section Geographical Locations Setup and click Edit.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeO4zNy5C7gSHIoUXDsK_C09hH2ua8A2OPqOBgbwHbDMfFY2hCEfDt359Z5VvfmXZBykCQkpaUGvM09NQWBDSOu6ZXpNQ3xDW-NCh_QCFSjz9wHH4Ny09ruQRie60T-UKzpRbtDtg?key=dn3f7P5ipNHDHqVjWKjxBQ" alt=""><figcaption></figcaption></figure>

**Step 5: Upload Your Locations File**

* Choose your geo-location method (IP address, Device geolocation or Manual).
* Download the provided template file.
* Fill out the required fields:
  * The specific URL where each CalcumateGEO calculator is installed
  * A friendly name for each location/calculator
  * The latitude and longitude coordinates for each location
* Upload your completed file in the same section.
* Click Save Changes.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdAVXcRaqVYMJC2Fu1HvRF6stUTqlOqypaGmXA3s4hCgHqa6H1MEb019KPZ1aqMt9WfVvSXa-2dym_WSOypzowIALwsNS6hHgTd5uIlzPB6LOFE_B2NOrol5kJpjVjskCU3YZiZ?key=dn3f7P5ipNHDHqVjWKjxBQ" alt=""><figcaption></figcaption></figure>

\
\ <br>


# CalcumateGEO Custom Events Integration

CalcumateGEO is an intelligent calculator routing system that automatically detects user location and dynamically redirects to the most appropriate calculator for their geographic region, while allowing users to select another location if required, via the a dropdown menu. The system preserves all calculator configurations and interactions through a robust custom event system that maintains data integrity across calculator transitions.

## Booking Event

This event works the same way as is described in [this article](/calculator-data-extraction/method-2-subscribe-to-the-calculator-event). &#x20;

### UserDetails Event

This event is triggered by the (optional) lead capture flow. It's important to note that CalcumateGEO should be configured for lead capture as stated in [this article](/driving-conversions-and-efficiency-with-lead-capture/lead-capture-overview). However, when configuring CalcumateGEO, in the advance settings menu:

<figure><img src="/files/hw7S2ZRszspeInMG8BJ4" alt=""><figcaption></figcaption></figure>

You should disable CTA redirect like this:

<figure><img src="/files/d7JHE8osSMoWOnlPaYLT" alt=""><figcaption></figcaption></figure>

If you omit this step, the event may not be triggered.


# CalcumateGEO Session Storage Cleanup in Single Page Applications

Our CalcumateGEO widget uses session storage to persist the selected `FACILITY-ID` across calculator interactions. While this enhances user experience, it can in very specific situations, cause conflicts when the calculator is used on different pages of the same website, such as when used within Single Page Applications.&#x20;

## Automatic Cleanup

The CalcumateGEO widget automatically attempts to clean up session storage in the following scenarios:

#### Traditional Multi-Page Websites

* **Page unload events**: `beforeunload` and `pagehide`
* **Component unmounting**: When React components are properly unmounted

## Current Limitations to Automatic Cleanup

In **Single Page Applications (SPAs)** and other unique scenarios where navigation doesn't trigger full page reloads, the below sequence can occur.\
\
When a user:

1. Visits **Page A** with the calculator and selects a facility
2. Navigates to **Page B** which also has the calculator
3. The `FACILITY-ID` from Page A persists and may interfere with Page B's calculator

This is because, in (for example) Single Page Applications (React, Vue, Angular, etc.), our automatic cleanup may not work reliably because:

* **No page reloads**: Navigation uses client-side routing
* **Event timing**: Page unload events may not fire during SPA navigation
* **Component lifecycle**: Our embedded script may not detect when you navigate between routes

## Workaround for SPA Applications

If you're using CalcumateGEO in an SPA, we recommend manually clearing the session storage when navigating away from pages that contain the calculator.

### React Implementation

```jsx
import React, { useEffect } from 'react';

const YourPageComponent = () => {
  useEffect(() => {
    return () => {
      try {
        sessionStorage.removeItem('FACILITY-ID');
      } catch (e) {
      }
    };
  }, []);

  return (
    <div>
      {/* Your CalcumateGEO widget here */}
    </div>
  );
};

export default YourPageComponent;
```

### Vue.js Implementation

```javascript
export default {
  name: 'YourPageComponent',
  beforeUnmount() {
    try {
      sessionStorage.removeItem('FACILITY-ID');
    } catch (e) {
      // Handle cases where sessionStorage might not be available
    }
  }
}
```

### Angular Implementation

```typescript
import { Component, OnDestroy } from '@angular/core';

@Component({
  selector: 'app-your-page',
  templateUrl: './your-page.component.html'
})
export class YourPageComponent implements OnDestroy {
  
  ngOnDestroy(): void {
    try {
      sessionStorage.removeItem('FACILITY-ID');
    } catch (e) {
      // Handle cases where sessionStorage might not be available
    }
  }
}
```

## Future improvements

We're actively working on a more robust solution that will:

* Auto-detect SPA navigation patterns
* Eliminate the need for manual cleanup in most scenarios

This documentation will be updated once these improvements are released.


# Calcumate Supported Languages

Calcumate is designed to support operators worldwide. To help you provide a seamless experience to your customers, the calculator is available in multiple languages.

Below is the full list of languages currently supported:

* Arabic
* Catalan
* Czech
* Danish
* Dutch
* English
* Estonian
* Finnish
* French
* German
* Greek
* Hebrew
* Hungarian
* Italian
* Japanese
* Korean
* Lithianian
* Malay
* Norwegian
* Polish
* Portuguese
* Romanian
* Slovak
* Spanish
* Swedish
* Chinese
* Turkish
* Vietnamese<br>

If you operate across multiple regions or countries, you can configure a different calculator for each language.

### Need Another Language?

We continue expanding our language coverage as we grow internationally. If your required language is not listed above, please [contact us](https://calcumate.co/contact-us).

<br>


# Container Requirements (Width/Height)

Guide explaining when and how to add explicit width/height to the Calcumate container to fix layout issues in iframes, site builders, and other environments where dimensions aren't inherited naturally

## Container Requirements (Width/Height)

### Why does Calcumate need a container with defined dimensions?

When Calcumate initializes, it attempts to measure and reserve space in the DOM to properly render the calculator interface. The calculator uses this measurement to determine responsive breakpoints, layout proportions, and component sizing.

In standard web page implementations, the `calcumate-root` div naturally inherits a usable width from its parent elements. However, certain environments prevent this inheritance, causing the container to report a width of `0` or an undefined value. When this happens, Calcumate cannot calculate proper dimensions, resulting in layout failures or the calculator not loading at all.

### When do container width issues occur?

Container width problems most commonly appear in these scenarios:

**Iframe Embedding** When using web editors like Wix, GoDaddy, Framer, Squarespace, or similar CMS platforms that embed custom code inside iframes, the `calcumate-root` div may not inherit any natural width from the parent document.

**Site Builders with Isolated Containers** Some site builders place custom HTML blocks inside containers that have no explicit dimensions, use `display: inline`, or are hidden during initial page load.

**CSS Frameworks with Flex/Grid Layouts** Containers using `flex` or `grid` layouts without explicit sizing can result in zero-width children until content forces expansion—which Calcumate cannot trigger during its initialization phase.

**Delayed or Lazy-Loaded Sections** If your calculator is inside a tab, accordion, modal, or lazy-loaded section that starts hidden (`display: none`), the container may report zero dimensions when Calcumate first tries to initialize.

### Symptoms of missing container dimensions

If your container lacks proper dimensions, you may experience:

* Calculator not appearing at all (blank space)
* Calculator appearing extremely small or compressed
* Layout elements overlapping or misaligned
* JavaScript console errors related to dimension calculations
* Calculator loading on desktop but failing on mobile (or vice versa)

### Recommended Solution

Add explicit width styling to your `calcumate-root` div:

```html
<div id="calcumate-root"
     data-integration="www.yourdomain.com"
     data-ref="your-ref-code"
     data-int="your-int-code"
     style="width: calc(100vw - 40px); max-width: calc(100vw - 40px);">
</div>
<script src="https://production.calcumate.co/static/js/main.js"></script>
```

The `calc(100vw - 40px)` formula provides viewport-relative sizing with a small margin to prevent horizontal scrollbars.

#### Alternative sizing approaches

Depending on your specific setup, you may prefer different width values:

**Fixed width for consistent sizing:**

```html
style="width: 980px; max-width: 100%;"
```

**Percentage-based for flexible layouts:**

```html
style="width: 100%; max-width: 1200px;"
```

**Viewport-relative without margins:**

```html
style="width: 100vw; max-width: 100vw;"
```

### Iframe-Specific Recommendations

When embedding Calcumate inside an iframe, you need to configure both the iframe dimensions and the container within it.

#### Recommended iframe dimensions

| Device  | Width | Height |
| ------- | ----- | ------ |
| Desktop | 980px | 800px  |
| Mobile  | 350px | 850px  |

#### Complete iframe implementation example

```html
<!-- On your main page -->
<iframe 
    src="https://yourdomain.com/calculator-page" 
    width="980" 
    height="800"
    style="border: none; max-width: 100%;"
    title="Storage Calculator">
</iframe>
```

```html
<!-- On the calculator page (inside the iframe) -->
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body { margin: 0; padding: 10px; }
    </style>
</head>
<body>
    <div id="calcumate-root"
         data-integration="your-data-integration"
         data-ref="your-data-ref"
         data-int="your-data-int"
         style="width: calc(100vw - 40px); max-width: calc(100vw - 40px);">
    </div>
    <script src="https://production.calcumate.co/static/js/main.js"></script>
</body>
</html>
```

### When should you apply these styles?

**Apply explicit width styling when:**

* Embedding through Wix, GoDaddy, Framer, Squarespace, or similar site builders
* Placing the calculator inside an iframe
* Using CSS frameworks that don't provide natural container widths
* The calculator appears inside tabs, modals, accordions, or collapsible sections
* You experience any of the symptoms described above
* You're unsure about your container's natural dimensions

**You may not need explicit styling when:**

* Embedding directly into standard HTML pages with normal document flow
* Your container already has explicit CSS width defined elsewhere
* The calculator is loading correctly without any layout issues

### Troubleshooting steps

If you're experiencing layout issues, follow these steps:

1. **Inspect the container**: Use browser developer tools (F12) to check if `calcumate-root` has a computed width greater than zero.
2. **Add explicit dimensions**: Apply the recommended inline style to your `calcumate-root` div.
3. **Clear cache and refresh**: Perform a hard refresh (Ctrl+Shift+R or Cmd+Shift+R) to ensure you're seeing the latest changes.
4. **Check responsive behavior**: Test both desktop and mobile viewports to ensure the calculator displays correctly at all sizes.
5. **Verify parent containers**: Ensure no parent element is constraining or hiding your calculator container.

### Need more help?

If you've followed this guide and are still experiencing issues, please contact our support team with:

* Your website URL where the calculator is embedded
* Screenshots of the issue (desktop and mobile if applicable)
* Browser console errors (if any)
* Your CMS or site builder platform name

We're here to help ensure your Calcumate integration works perfectly.


# CalcumateInitialized Event

## What is the CalcumateInitialized event?

The `CalcumateInitialized` event is a custom browser event that gets automatically dispatched when Calcumate completes its initial setup and is ready for user interaction. This event allows you to programmatically detect when the calculator has fully loaded and access its configuration data.

### When is this event triggered?

The event is fired once during the initial load, immediately after:

* Integration data has been successfully fetched
* Categories and items have been loaded
* User's previously selected items have been restored (if any)
* All validation checks have passed
* The calculator UI is ready for interaction

### How do I listen for this event?

You can listen for the `CalcumateInitialized` event using a standard event listener:

```javascript
window.addEventListener('CalcumateInitialized', (event) => {
  const data = event.detail;
  console.log('Calcumate initialized:', data);
  
  // Your custom logic here
  handleCalcumateReady(data);
});
```

### What data does the event contain?

The initialization data is available in the `event.detail` property and includes comprehensive information about the calculator's configuration:

```javascript
{
    "state": {
        "isReady": true,
        "selectedCategory": "presets",
        "selectedCategoryList": "all",
        "selectedItems": [
            {
                "id": "BUFFETT-LIVINGROOM-19",
                "sort": 7,
                "product": "Buffett",
                "cssId": "buffet",
                "calcumatex": true,
                "calcumate": true,
                "depth": 124.3,
                "dashboard": true,
                "order": 11,
                "weight": 40,
                "active": true,
                "width": 45.6,
                "height": 52.2,
                "category": "Living Room",
                "thumbnail": "buffett.webp",
                "quantity": 1
            },
            ...
        ],
        "primaryCalculation": null,
        "secondaryCalculation": null,
        "calculating": false,
        "showDialog": false,
        "animation": "play",
        "animationTimeOuts": [],
        "searchString": "",
        "matchedItems": [],
        "scrollToItem": -1,
        "showCustomItemForm": false,
        "customItems": [],
        "showListModeScreen": false,
        "showPresetsListModeScreen": false,
        "location": null,
        "isLocationEnabled": true,
        "notification": null,
        "userGeo": null,
        "isCSP": false
    }
}
```

### Best Practices

* **Add the event listener early** - Place your event listener in the `<head>` or early in the `<body>` to ensure you don't miss the event.
* **Remove event listeners** when they're no longer needed to prevent memory leaks:

```javascript
  const handler = (event) => {
    console.log('Initialized!', event.detail);
  };
  
  window.addEventListener('CalcumateInitialized', handler);
  
  // Later, when cleaning up
  window.removeEventListener('CalcumateInitialized', handler);
```

### Timing considerations

The `CalcumateInitialized` event fires **before** the `CalculationFinished` event. Here's the typical event sequence:

1. `CalcumateInitialized` - Calculator is ready and loaded
2. User interacts with calculator (adds items, etc.)
3. `CalculationFinished` - Calculation results are available

### Browser Compatibility

This feature uses the standard `CustomEvent` API, which is supported in all modern browsers. For older browser support, you may need a polyfill.

### Troubleshooting

#### Event not firing?

* Check browser console for initialization errors
* Verify the Calcumate script is loading correctly
* Ensure there are no domain mismatch errors blocking initialization

#### Need to re-initialize?

```javascript
window.dispatchEvent(new CustomEvent('RE-INIT', {}));
```


# CalculationFinished Event

### What is the CalculationFinished event?

The `CalculationFinished` event is a custom browser event that gets automatically dispatched when a calculation process completes. This event allows you to programmatically detect when calculations are done and access the results.

### When is this event triggered?

The event is fired immediately after any calculation finishes processing.

### How do I listen for this event?

You can listen for the `CalculationFinished` event using a standard event listener:

```javascript
window.addEventListener('CalculationFinished', (event) => {
  const result = event.detail;
  console.log('Calculation completed:', result);
  
  // Your custom logic here
  handleCalculationResult(result);
});
```

### What data does the event contain?

The calculation results are available in the `event.detail` property.

```json
[
    {
        "unit": {
            "svg": "<svg image>",
            "svgM": null,
            "zero": {
                "left": 457.015,
                "bottom": 563.5
            },
            "imageSize": {
                "width": 891,
                "height": 891
            },
            "name": "5m x 5m",
            "id": "<unit-id>",
            "unitDetails": {
                "id": "<unit-id>",
                "name": "5m x 5m",
                "unit": {
                    "ID": "unit-id",
                    "unitName": "5m x 5m",
                    "unitWidth": "5",
                    "unitHeight": "2.4",
                    "unitDepth": "5"
                },
                "dimensions": {
                    "width": 500,
                    "depth": 500,
                    "height": 240
                }
            }
        },
        "items": [
            {
                "id": "bbq",
                "x": -88.248457,
                "y": -80.79013988439307,
                "orientation": "turned",
                "scale": false,
                "width": 49.5,
                "volume": 0.50642262,
                "quantity": 1,
                "image": null
            }
        ],
        "totalItemsWeight": 908.4,
        "totalVolume": 15.765080274,
        "animationDone": true
    }
]
```

### Best Practices

* **Always add the event listener before initiating calculations** to ensure you don't miss the event.
* **Remove event listeners** when they're no longer needed to prevent memory leaks.

### Browser Compatibility

This feature uses the standard `CustomEvent` API, which is supported in all modern browsers. For older browser support, you may need a polyfill.


# How to Hide Storage Unit Recommendations in the Calculator

### What does the `data-disable-list-results` attribute do?

The `data-disable-list-results` attribute allows you to hide the recommended storage units list that normally appears in the calculator results. When set to `'true'`, this attribute will hide the "WE RECOMMEND" section that shows suggested unit sizes and the "BOOK NOW" button, while keeping the visual storage unit preview intact.

### When would I want to use this feature?

You might want to disable the unit recommendations list in several scenarios:

* **Custom booking flow**: When you want to handle unit selection and booking through your own system
* **Information-only display**: When you want to show only the visual representation without specific unit recommendations
* **Integration constraints**: When the recommended units don't align with your available inventory

### How do I implement this feature?

Add the `data-disable-list-results="true"` attribute to your calculator's root div element:

#### Basic Implementation

html

```html
<div id="calcumate-root" 
     data-disable-list-results="true" <- Add this
>
</div>
```

### What will users see with this setting enabled?

With `data-disable-list-results="true"`:

✅ **Still visible:**

* Room type selector (Living Room, Bedroom, Kitchen, etc.)
* Preset options (1 Bedroom, 2 Bedroom, etc.)
* Visual storage unit representation with items
* Item category selection
* Calculation animation

❌ **Hidden:**

* "WE RECOMMEND" section
* Specific unit size recommendations (e.g., "5m x 5m")
* "BOOK NOW" button
* Edit Button

### Can I toggle this setting dynamically?

Yes! You can enable or disable the list results at any time by updating the attribute value:

```javascript
// Hide the recommendations list
document.getElementById('calcumate-root').setAttribute('data-disable-list-results', 'true');

// Show the recommendations list
document.getElementById('calcumate-root').setAttribute('data-disable-list-results', 'false');
// OR remove the attribute entirely
document.getElementById('calcumate-root').removeAttribute('data-disable-list-results');
```

But you will need to initialize the calculator again like this:

```javascript
window.dispatchEvent(new CustomEvent('RE-INIT', {}));
```

### Default behavior

If the `data-disable-list-results` attribute is not present or set to any value other than `'true'`, the calculator will display the recommendations list as normal.

### Need help?

If you're having trouble implementing this feature or need assistance with your calculator integration, please contact our support team with your integration details and specific requirements.


# Migrating to Our New High-Performance Calculator

## Migrating to Our New High-Performance Calculator

We've launched a major update to our calculator with significant performance improvements. This guide will help you migrate from the old endpoint to our new, faster calculator.

### Why Migrate?

Our new calculator delivers:

* **90% faster load times** in most locations
* **Reduced file size** from 1.2MB to just 0.2MB
* **Global CDN delivery** through Cloudflare for faster worldwide access
* **Optimized code** with improved dependencies and compression

### Migration Steps

The migration process is simple and only takes a few minutes:

#### Step 1: Access Your Dashboard

Log into your [Calcumate dashboard](https://dashboard.calcumate.co/)

#### Step 2: Update Your Calculator

1. Navigate to your calculator settings
2. Click **Edit** on your existing calculator
3. Click **Publish** to regenerate your integration code

#### Step 3: Update Your Website Code

After republishing, you'll receive new integration code. The key change is:

**New endpoint:**

```html
<script defer src="https://production.calcumate.co/static/js/main.js"></script>
```

Copy the new code and replace it on your website where the calculator is displayed.

### Performance Comparison

Based on testing from various US locations, here's what you can expect:

#### Before Migration (Old Calculator)

* **Total Load Time:** 997.4ms
* **File Transfer:** \~1.2MB
* **Connection Time:** 281.9ms

<figure><img src="/files/hVmzujM98jFrxN7sULkl" alt=""><figcaption></figcaption></figure>

#### After Migration (New Calculator)

* **Total Load Time:** 98.2ms **(90% improvement)**
* **File Transfer:** \~0.2MB **(83% reduction)**
* **Connection Time:** 28.2ms **(90% improvement)**

<figure><img src="/files/yfYHoiW4JaTpcLDZ9qt6" alt=""><figcaption></figcaption></figure>

*Results may vary based on your internet connection and geographic location.*

### Need Help?

If you encounter any issues during migration or have questions about the process, please contact our support team. We're here to ensure a smooth transition to the new calculator.

### Important Notes

* The migration only affects the technical endpoint - your calculator settings, design, and functionality remain unchanged.
* Users will experience faster loading times immediately after migration.
* No downtime is required for this migration process.


# Embedding with iframes

If you’re adding your integration through web editors like Wix or GoDaddy then your Calcumate integration will likely be added inside an iframe. \
\
This shouldn’t impact the performance of either your website or your Calcumate integration but you may need to manually set the height and width of the iframe in order for it to appear correctly on your website. \
\
Importantly, you’ll need to set the dimensions for both desktop and mobile devices. \
\
We recommend: \
Desktop: 980px x 800px \
Mobile: 350px x 850px

<figure><img src="/files/Ez5gZMKSjllNlFKJc8LG" alt=""><figcaption></figcaption></figure>


# Domain mismatch error

This error message appears when the domain set for your Calcumate integration doesn’t match the one your integration has been embedded onto.&#x20;

Commonly this is because of either a spelling mistake, or way our database reads your domain.&#x20;

Either way, there’s a simple solution:

1. Copy the URL that our error message has recommended.
2. Login to your Calcumate account [here](https://calcumate.co/login) and paste the URL in step 1 of the integration builder.
3. Continue through the steps and re-publish your integration code snippet.
4. Copy this new integration and use it to replace the existing code on your website.
5. Go to the right page and clear your cache before completing a hard refresh of your browser

<figure><img src="/files/rIQpKAS8BZVyov3qy5UF" alt=""><figcaption></figcaption></figure>


# Where can I find my invoices?

1. Start by logging into your account [here](https://calcumate.co/login).&#x20;
2. Go to 'my account' on the left hand menu.
3. Scroll down to 'billing history'.


# Update account details

1. Login to your account [here](https://calcumate.co/login).&#x20;
2. Go to 'my account'.&#x20;
3. Under 'account details' click the edit (pencil) icon, to the right side of the screen and edit your details accordingly.&#x20;

If you need to update your business/company name please email us on <info@calcumate.co>.


# Logging into your dashboard

How to login and view your calculator

1. Login to your account here - <https://calcumate.co/login>&#x20;
2. Click the 'edit' button on your integration&#x20;

<figure><img src="/files/x5i4GviceKYbc69bp0X3" alt=""><figcaption></figcaption></figure>

3. You're now logged in and can start adding furniture items. To save time, we have created some 'presets'. Presets have been designed for 1/2/3/4 bedroom homes (you can edit presets if you want to add more into them).

<figure><img src="/files/tMRngeNqyeIaJKoQ7Nwz" alt=""><figcaption></figcaption></figure>

4. Go ahead and add your items and click 'calculate'.&#x20;

<figure><img src="/files/1Wi92XL6p9JbX4Wxp2Zj" alt=""><figcaption></figcaption></figure>

5. Your recommended storage unit will appear. \
   You can set your 'get quote' button to have a hyperlink (call to action) to redirect your customer to your landing/quote/booking page.

<figure><img src="/files/IJc5KCWK1CNZ02eUgv0K" alt=""><figcaption></figcaption></figure>


# Set up multiple calculators fast

You may have multiple storage/removalist locations and offer multiple services and don't want to make multiple calculators, that takes to much time.

To speed up the process we have created a quick 'copy' button. Copying your calculator will retain all of your design and settings setup as per the original calculator.&#x20;

This means you only need to change the service type (i.e. self storage -> container storage) and modify the unit sizes, whilst retaining all your previously customised settings. &#x20;

<figure><img src="/files/MaGYkrG8JAEH9pMZ4kte" alt=""><figcaption></figcaption></figure>


# How do I position/style the geo location widget?

\[These instructions are under development]

\
**Example code to reposition the geo location widget:**<br>

Pull location dialof top-right:\
`.select-locations-wrap {`\
&#x20;   right: 0px!important; //To create offset from right side in 15 px:  right: 15px;\
&#x20;   left: unset;//reset default left position

}&#x20;

Pull it top-left:\
.select-locations-wrap {\
`right: unset; //reset property`\
`left: 15px!important;`\
`margin-left: unset; // reset styles for centering of block` [`https://www.w3.org/Style/Examples/007/center.en.html`](https://www.w3.org/Style/Examples/007/center.en.html)\
}\
\
Pull it bottom-left:\
`.select-locations-wrap {`\
`right: unset;`\
`left: 15px!important;// or any value`\
`margin-left: unset;`\
`top: unset;`\
`bottom: 15px!important; or any value`\
\
Pull it bottom-right:\
`.select-locations-wrap {`\
`right: 15px!important;`\
`left: unset;`\
`margin-left: unset;`\
`top: unset;`\
`bottom: 15px!important; or any value`\
`}`\
\
**Example code to change the style of the geo location widget (you can use any CSS style):**\
\
Change the style of the geo location widget\
\
`.select-locations-wrap { //change background color to red`\
`background-color: red;`\
`}`\
`.select-locations-wrap * { //change font size`\
`font-size: 15px!important;`\
`}`\
`.select-locations-wrap * { //change font family`\
`font-family: 'Roboto';`\
`}`\ <br>

**A note about the use of "!important":**&#x20;

Sometimes the browswer will ignore some styles, because there are more important styles for that specific element. In this case, the use of "!important" is often an easy solution to force the browser to use the style that you require. More information here: <https://www.w3schools.com/css/css_important.asp>


# How to Integrate Calculator Widget in React Native

### Installation

First, install the required WebView package:

```bash
npm install react-native-webview
```

or if you're using Yarn:

```bash
yarn add react-native-webview
```

### Integration Methods

#### Method 1: Self-Hosted Integration

If you have the calculator hosted on your website, you can simply point the WebView to that URL.

```javascript
import { WebView } from 'react-native-webview';

const CalculatorComponent = () => {
  return (
    <WebView 
      source={{ uri: 'https://yourcompany.com/calculator' }} 
      style={{ flex: 1 }}
    />
  );
};

export default CalculatorComponent;
```

#### Method 2: Inline HTML Integration

Embed the calculator script directly using an HTML template within the WebView.

```javascript
import React from 'react';
import { WebView } from 'react-native-webview';

const CalculatorComponent = () => {
  const htmlContent = `
    <!DOCTYPE html>
    <html>
    <head>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <style>
        body { margin: 0; padding: 10px; }
      </style>
    </head>
    <body>
      <div id="calcumate-root" 
           data-integration="your-data-integration" 
           data-ref="your-data-ref" 
           data-int="your-data-int"></div>
      <script src="https://production.calcumate.co/static/js/main.js"></script>
    </body>
    </html>
  `;

  return (
    <WebView 
      source={{ html: htmlContent }} 
      style={{ flex: 1 }}
    />
  );
};

export default CalculatorComponent;
```

### Advanced: Event Handling

To capture calculator events and communicate with your React Native app, you can use JavaScript injection and message passing.

```javascript
import React from 'react';
import { WebView } from 'react-native-webview';

const CalculatorComponent = () => {
  const htmlContent = `
    <!DOCTYPE html>
    <html>
    <head>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
      <div id="calcumate-root" 
           data-integration="your-data-integration" 
           data-ref="your-data-ref" 
           data-int="your-data-int"></div>
      <script src="https://production.calcumate.co/static/js/main.js"></script>
    </body>
    </html>
  `;

  const calculatorEventListener = `
    window.addEventListener('Booking', function(event) {
      window.ReactNativeWebView.postMessage(JSON.stringify({
        type: 'calculatorLeadFillEvent',
        data: event.detail
      }));
    });

    window.addEventListener('userDetails', function(event) {
      window.ReactNativeWebView.postMessage(JSON.stringify({
        type: 'userDetails',
        data: event.detail
      }));
    });

    true; // Required for injectedJavaScript
  `;

  const handleMessage = (event) => {
    try {
      const data = JSON.parse(event.nativeEvent.data);
      
      if (data.type === 'calculatorLeadFillEvent') {
        console.log('Calculator lead data:', data.data);
        // Handle lead form submission
        // Example: navigation, API calls, etc.
      } else if (data.type === 'userDetails') {
        console.log('User details:', data.data);
        // Handle user details update
      }
    } catch (error) {
      console.error('Error parsing WebView message:', error);
    }
  };

  return (
    <WebView
      source={{ html: htmlContent }}
      injectedJavaScript={calculatorEventListener}
      onMessage={handleMessage}
      style={{ flex: 1 }}
    />
  );
};

export default CalculatorComponent;
```

### Configuration Parameters

Replace the following placeholder values with your actual configuration:

* `your-data-integration`: Your integration identifier
* `your-data-ref`: Your reference parameter
* `your-data-int`: Your integration parameter
* `https://yourcompany.com/calculator`: Your actual calculator URL

### Best Practices

* **Error Handling**: Always wrap message parsing in try-catch blocks
* **Loading States**: Consider adding loading indicators while the WebView loads
* **Responsive Design**: Ensure the calculator works well on different screen sizes
* **Performance**: Monitor WebView performance, especially on older devices

### Troubleshooting

#### Common Issues

**Calculator not loading:**

* Verify the script URL is accessible
* Check network connectivity
* Ensure all required parameters are provided

**Events not firing:**

* Confirm JavaScript injection is working
* Check browser console for errors (use remote debugging)
* Verify event listener names match the calculator's events

**Layout issues:**

* Adjust the WebView container styling
* Check viewport meta tag settings
* Test on different device sizes

#### Getting Help

If you encounter issues during implementation:

1. Check the browser console for JavaScript errors
2. Verify all configuration parameters are correct
3. Test the calculator in a regular web browser first
4. Contact our support team with specific error messages and device information

### Support

For additional assistance or troubleshooting, please reach out to our support team with:

* Device and OS version
* React Native version
* Specific error messages or screenshots
* Steps to reproduce the issue


# Configuring Content Security Policy (CSP) for Calcumate

If your site uses [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) to mitigate threats such as cross-site scripting (XSS) and clickjacking, you'll need to allow the Calcumate domains below so the calculator widget can load and operate correctly.

CSP is enforced per-directive, so it's not enough to list our domains in a single place — each domain needs to be added to the directive that matches the type of resource it serves. The table below shows exactly where each domain belongs.

### Required allowlist

| Directive     | Domains to allow                                                                                                                                                                                                                  | Purpose                                                |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `script-src`  | `https://*.calcumate.co`                                                                                                                                                                                                          | Loads the calculator widget bundle                     |
| `connect-src` | <p><code>https\://\*.calcumate.co</code><br><code><https://optimize.calcumate.co></code><br><code><https://r354ovsoac.execute-api.ap-southeast-2.amazonaws.com></code></p>                                                        | API calls for calculator data and packing optimization |
| `img-src`     | <p><code>https\://\*.calcumate.co</code><br><code><https://calcumate-calculator-new-production.s3-ap-southeast-2.amazonaws.com></code><br><code><https://calcumatev2-attachments-prod.s3-ap-southeast-2.amazonaws.com></code></p> | Item images, icons, and customer-uploaded attachments  |
| `style-src`   | `https://*.calcumate.co`                                                                                                                                                                                                          | Widget styles                                          |
| `frame-src`   | `https://*.calcumate.co`                                                                                                                                                                                                          | Embedded calculator frame (if applicable)              |

If your CSP relies on `default-src` as a catch-all, adding the domains there will also work — but we recommend per-directive rules for tighter security.

### Example CSP header

Here's an example header that allows Calcumate alongside common third-party services:

```
Content-Security-Policy:
default-src 'self';
script-src  'self' https://*.calcumate.co;
connect-src 'self' https://*.calcumate.co https://optimize.calcumate.co https://r354ovsoac.execute-api.ap-southeast-2.amazonaws.com;
img-src     'self' data: https://*.calcumate.co https://calcumate-calculator-new-production.s3-ap-southeast-2.amazonaws.com https://calcumatev2-attachments-prod.s3-ap-southeast-2.amazonaws.com;
style-src   'self' 'unsafe-inline' https://*.calcumate.co;
frame-src   'self' https://*.calcumate.co;
```

### How to identify a CSP issue

If the calculator stops loading after a CSP change, open your browser's developer console. CSP violations look like this:

> Refused to connect to 'https\://…' because it violates the following Content Security Policy directive: "connect-src …"

The directive named in the error message tells you exactly where the missing domain needs to be added.

> **Note:** Errors that say `ERR_BLOCKED_BY_CLIENT` are *not* CSP-related, they come from browser extensions (ad-blockers, privacy tools) on the visitor's device and aren't something your CSP or our widget can resolve.

### Need help?

If you've added these rules and the calculator still isn't loading, send us a screenshot of the console errors and the relevant CSP header from your site, and we'll help diagnose.


# Lead capture overview

Calcumate can now provide you with improved lead flow to help you convert more business, improve efficiency and gain an edge over competitors.

Turning on lead capture provides:

1. **More leads**, by reducing the chances that a visitor uses your calculator but never provides you with their contact details.<br>
2. **Detailed information about your prospects' requirements**, enabling you to have a more relevant conversation, increasing the chances that you'll convert the prospect into a paying customer.<br>
3. **Instant answers to your prospects**, meaning they can book straight away without needing to find time to call you or wait for responses from your team. The result is that you can close new business faster.<br>
4. **Improved efficiency,** because you team needs to invest less time to win each new customer.

\
With lead capture you can capture rich data including:

* Prospect contact details
* Details of items they wish to store or move
* Details of your appropriate storage units / moving trucks
* A link to be able to re-access the prospects calculator, providing:
  * a reminder of what needs to be stored/moved
  * a loading plan which can be played, paused and rewound


# Lead data that can be captured

Calcumate can now provide you with improved lead flow by capturing rich lead data including:

* Contact details
* Details of items they wish to store or move
* Details of your appropriate storage units / moving trucks
* A link to be able to re-access the prospect's calculator, providing:
  * a reminder of what needs to be stored/moved
  * a loading plan which can be played, paused and rewound

**The specific data you are able to collect includes:**

| Field                     | Explanation                                                                                                                                                                                                                                                                                                                                              | Example                                                                                        |                                                                                                                          |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Full name**             | Full name                                                                                                                                                                                                                                                                                                                                                | Mr. Ben Smith                                                                                  |                                                                                                                          |
| **Email**                 | Email                                                                                                                                                                                                                                                                                                                                                    | <bensmith@gmail.com>                                                                           |                                                                                                                          |
| **Phone**                 | Phone                                                                                                                                                                                                                                                                                                                                                    | 934 012 3450                                                                                   |                                                                                                                          |
| **Start Date**            | The date that the person would like to begin storing their items.                                                                                                                                                                                                                                                                                        | 2024-03-10                                                                                     |                                                                                                                          |
| **Items List**            | A list of items and their quantities                                                                                                                                                                                                                                                                                                                     | 2 seat sofa X1, Coffee table X1, TV X1, Queen/King mattress X1, Bed base (frame) X1, Fridge X1 |                                                                                                                          |
| **Recommended Unit Size** | <p>For a storage calculator: <br><br>The title you give to the recommended unit.<br><br><br>For a movers calculator:<br></p><p>The recommended unit name, and its: capacity (space), utilisation (used) and total weight.</p>                                                                                                                            | <p><br>For a storage calculator:<br><br>5ft x 5ft                                              | $43 monthly<br></p><p><br>For a movers calculator:<br><br>Small Truck <br>Space: 18m3 Used: 3.73m3 Weight: 176.2 kgs</p> |
| **Unit Details**          | A description you give to the  unit.                                                                                                                                                                                                                                                                                                                     | Best for Studio or a few items                                                                 |                                                                                                                          |
| **Calculator Name**       | The name of the calculator. Useful if you have multiple calculator for different locations, franchisees, or similar.                                                                                                                                                                                                                                     | Hollywood Movers                                                                               |                                                                                                                          |
| **Shared Results Link**   | <p>An link to the customer's calculator results. You can send this to the customer so that they can:</p><ul><li>remember what they wanted to store</li><li>play, pause and rewind their step by step loading plan</li></ul><p>The customer will also be offered to bookmark the link, after they have filled out their details and sent them to you.</p> | <https://www.calcumate.co/?planId=6c5c9c50-17b3-4948-ab6b-f4fc29eb8f13>                        |                                                                                                                          |


# Setting up lead capture

To turn on lead capture:

1. Log in to your dashboard here: [www.calcumate.co/login](https://help.calcumate.co/driving-conversions-and-efficiency-with-lead-capture/www.calcumate.co/login)<br>
2. Ensure your plan is at least Generator (ie. Generator or Enterprise) to enable the lead capture function.<br>
3. Navigate to the calculator to which you wish to add lead capture.<br>
4. Go to 'advanced settings' on the 'options' tab.&#x20;

<figure><img src="/files/VAErWwlvpnS1qxMeKLOd" alt=""><figcaption></figcaption></figure>

5. Turn on 'request lead details from the user'.\
   Add the email address you want all leads to be sent to i.e. <sales@mycompany.com>, press '+'.\
   If you want multiple recipients you can repeat the process to add multiple email addresses.&#x20;

<figure><img src="/files/P7THtZeMB4xctDs9kk3C" alt=""><figcaption></figcaption></figure>

6. Editing your lead generation form. \
   Click the pencil icon to edit the questions on your lead generation form. <br>

   <figure><img src="/files/UpMhFcYWJoDdxYPSF2n6" alt=""><figcaption></figcaption></figure>

7. You can edit the default questions by clicking the pencil icon. \
   You can press the bin icon to delete questions you don't want.\
   To add additional fields, press 'add additional field'.

<figure><img src="/files/K1EE0hq19JQhCdIX5m9H" alt=""><figcaption></figcaption></figure>

* For example, you can add a calendar (date selection) and/or extra comments (text response).\
  Press 'save' when happy with your changes.

<figure><img src="/files/Ep2bLdOmpiMTsZ78AIX8" alt="" width="534"><figcaption></figcaption></figure>

## Your customer experience will look like this

* The customer can use your presets or build their calculation by selecting individual items.
* Calcumate will generate the result and provide the recommended storage unit.&#x20;
* The customer can select 'BOOK NOW' and they will provided with your lead generation form.&#x20;
* After completing the form, they will press 'BOOK NOW' and be redirected to your CTA (call to action) URL. \
  (You can update your CTA link in the 'options' tab)\ <img src="/files/mW0t8l6b9ra3R8ZhFki1" alt="" data-size="original">

Customer point of view below.

<figure><img src="/files/LkXDRlHdTnNuCnRyRMCu" alt=""><figcaption></figcaption></figure>

## Your point of view&#x20;

You will receive an email with the information you have requested in your landing page.

<figure><img src="/files/t0mws3dSxzsGpikQxA7S" alt=""><figcaption></figcaption></figure>


# Advanced Integration: Lead Data Flow

#### Lead Data Connectivity

While Calcumate provides a built-in lead capture form, you may want to pass that data to external systems.

**Data Direction**

* FROM Calcumate TO External Systems: Supported. You can capture lead details via JavaScript events.
* FROM External Systems TO Calcumate: Not Supported. Calcumate does not currently accept lead data (Name, Email, Phone) via URL parameters to pre-populate its internal forms.

**Capturing Lead Details via JavaScript**

If you have "Request lead details from the user" enabled, Calcumate triggers a `userDetails` event whenever a user submits the lead form. You can listen for this on your host page to trigger secondary actions:

JavaScript

```
window.addEventListener('userDetails', (e) => {
  const { name, email, phone } = e.detail; // or other fields you added to the form
  console.log("Lead captured:", name, email, phone);
});
```

**Important Note on URL Parameters**

When using the CTA redirect feature, Calcumate appends calculation data (e.g., `cm-qty`, `cm-volume`, `cm-location`) to the URL. However, for privacy and security, Lead/Contact details are not included in URL parameters. Use the `userDetails` event above to handle contact information.


# Method 1: URL GET Parameters

This method will append parameters to the URL of your Call To Action URL. That is, when the user clicks the CTA button (which might say something like "Get Quote" or "Book Now" depending on how you have set it up), the user will be redirected to the CTA URL that you set, with the GET parameters appended.&#x20;

To set this up:

1. [Login](https://help.calcumate.co/calculator-data-extraction/www.calcumate.co/login), open your desired calculator, and click "SHOW ADVANCED SETTING":

<figure><img src="/files/INOnhFnYNwpxZURvoZdy" alt=""><figcaption></figcaption></figure>

2. Within the Advanced Settings screen, select the CRA URL Params that you want to be appended, and set your CTA Link. This is what the screen looks like:

<figure><img src="/files/5u9bYpyN4G4zWp3Hrq3S" alt="" width="346"><figcaption></figcaption></figure>

3. If your CTA URL has all the parameters appended, it will use this syntax:\
   \
   [www.abc.com/book-now?cm-qty={qty}\\\&cm-id={id}\\\&cm-volume={totalVolume}\\\&cm-used-volume={usedVolume}](http://www.abc.com/book-now?cm-qty={qty}\\\&cm-id={id}\\\&cm-volume={totalVolume}\\\&cm-used-volume={usedVolume})


# Method 2: Subscribe to the Calculator event

The calculator also fires an event that advanced customers can use to gain better control, access the data from the calculator, and tell tell the website what to do next.&#x20;

To use this method:&#x20;

1. [Login](https://help.calcumate.co/calculator-data-extraction/www.calcumate.co/login), open your desired calculator, and click "SHOW ADVANCED SETTING":

<figure><img src="/files/otZeFPFj0r0wTOU2bQyJ" alt=""><figcaption></figcaption></figure>

2. With the Advanced Settings, turn on "Disable CTA Redirection". This will prevent Calcumate from auto-redirecting to any CTA URLs, and instead hand control to your website after the Calcumate 'Booking' Javascript event fires. <br>
3. Listen to the following event:

```javascript
window.addEventListener('Booking', 
  (event) => {
     console.log(event);​

});

```

4. The event object contains all the detail of the calculation. Example:

<figure><img src="/files/NYcAz4ucscInFCnVjNll" alt=""><figcaption></figcaption></figure>

5. You can write code to tell your website what to do next. For example, you can use the data from the Booking event to determine where to send the user to next (and potentially pre-fill certain details such as the unit type the user requires).


# Filtering To Available Units

This guide provides instructions on how to filter out unavailable units from being displayed in the list of suggested units.

### Overview

Calcumate allows you to filter out specific units so that they do not appear in the results. This can be useful for managing inventory and ensuring only available units are displayed to users.

### Instructions

#### Disabling Units

To disable specific units, use the following JavaScript code:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [<Units ID>, <Units ID>],
}));
```

* Replace `<Units ID>` with the actual IDs of the units you want to disable.
* You can list multiple unit IDs separated by commas within the square brackets.

#### Enabling All Units

To enable all units again, pass an empty array in the `detail`:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [],
}));
```

#### Listing Available Units

To see a list of all available units, use the following command:

```javascript
window.listUnits
```

<figure><img src="/files/NHlSzG6JV84YvoOHeY0Z" alt=""><figcaption></figcaption></figure>

#### Listing Disabled Units

To see a list of all currently disabled units, use the following command:

```javascript
window.disableUnits
```

#### Example

1. Here is an example of how to disable two units with IDs `123` and `456`:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [123, 456],
}));
```

To enable all units again:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [],
}));
```


# Getting support

Can't find the answer you need in this support site?&#x20;

Please contact us [here](https://calcumate.co/contact-us) and we'll do our best to get back to you within one business day.&#x20;


# Security and privacy

Please see [here](https://calcumate.co/privacy-policy) a copy of our privacy policy.


# Terms and conditions of service

Please see [here](https://calcumate.co/terms-of-service) a copy of our terms of service.


